SSD2828 3-Wire 24bit Sample Code

/* spi write a data frame,type mean command or data 3 wire 24 bit SPI interface */ static void spi_send_data(unsigned int data) { unsigned int i; CS_SET(); udelay(1); CLK_SET(); TXD_SET(); CS_CLR(); udelay(1); for (i = 0; i < 24; i++) { //udelay(1); CLK_CLR();...

Driver for Panels with Renesas R63311

/* extended DCS commands (not defined in mipi_display.h) */ #define DCS_READ_DDB_START 0x02 #define DCS_READ_NUM_ERRORS 0x05 #define DCS_BRIGHTNESS 0x51 // write brightness #define DCS_READ_BRIGHTNESS 0x52 // read brightness #define DCS_CTRL_DISPLAY 0x53 // enable...

AVR C 语言编程基础

In this chapter you will explore some of the key concepts of C programming for AVR microcontrollers. 3.1   AVR Registers 3.2   Bits and Bytes 3.3   Bitwise Operations 3.4   Clearing and Setting Bits 3.5   The Bit Value Macro _BV() 3.1  AVR寄存器 A register is a special...

CC2540 UART

static void uart_init() { uint8 port = HAL_UART_PORT_0; //使用 CC2540 的 USART0,PORT0 halUARTCfg_t conf; conf.configured=TRUE; conf.baudRate = HAL_UART_BR_9600; //设置串口波特率为 9600bps conf.flowControl = 0; conf.intEnable=TRUE; HalUARTInit(); //串口初始化 //conf.callBackFunc =...