lld GPIO lsb/msb order fix
This commit is contained in:
parent
9e5cd3140a
commit
ccf2780be9
@ -9,10 +9,10 @@ extern uint16_t lcd_width, lcd_height;
|
||||
#ifdef LCD_USE_GPIO
|
||||
|
||||
static __inline void lld_lcdWriteGPIO(uint16_t d) {
|
||||
palWriteGroup(LCD_DATA_PORT_1, PAL_GROUP_MASK(4), LCD_DATA_PORT_1_BASE, d >> 12);
|
||||
palWriteGroup(LCD_DATA_PORT_2, PAL_GROUP_MASK(4), LCD_DATA_PORT_2_BASE, d >> 8);
|
||||
palWriteGroup(LCD_DATA_PORT_3, PAL_GROUP_MASK(4), LCD_DATA_PORT_3_BASE, d >> 4);
|
||||
palWriteGroup(LCD_DATA_PORT_4, PAL_GROUP_MASK(4), LCD_DATA_PORT_4_BASE, d >> 0);
|
||||
palWriteGroup(LCD_DATA_PORT_1, PAL_GROUP_MASK(4), LCD_DATA_PORT_1_BASE, d >> 0);
|
||||
palWriteGroup(LCD_DATA_PORT_2, PAL_GROUP_MASK(4), LCD_DATA_PORT_2_BASE, d >> 4);
|
||||
palWriteGroup(LCD_DATA_PORT_3, PAL_GROUP_MASK(4), LCD_DATA_PORT_3_BASE, d >> 8);
|
||||
palWriteGroup(LCD_DATA_PORT_4, PAL_GROUP_MASK(4), LCD_DATA_PORT_4_BASE, d >> 12);
|
||||
}
|
||||
|
||||
static __inline void lld_lcdWriteIndex(uint16_t index) {
|
||||
|
8
readme
8
readme
@ -14,10 +14,10 @@ add the following to your board.h file, matching to your pinconfig:
|
||||
#define LCD_DATA_PORT_2 GPIOB
|
||||
#define LCD_DATA_PORT_3 GPIOC
|
||||
#define LCD_DATA_PORT_4 GPIOE
|
||||
#define LCD_DATA_PORT_1_BASE 12
|
||||
#define LCD_DATA_PORT_2_BASE 8
|
||||
#define LCD_DATA_PORT_3_BASE 4
|
||||
#define LCD_DATA_PORT_4_BASE 0
|
||||
#define LCD_DATA_PORT_1_BASE 0
|
||||
#define LCD_DATA_PORT_2_BASE 4
|
||||
#define LCD_DATA_PORT_3_BASE 8
|
||||
#define LCD_DATA_PORT_4_BASE 12
|
||||
#define LCD_CMD_PORT GPIOD
|
||||
#define LCD_CS 12
|
||||
#define LCD_RS 13
|
||||
|
Loading…
Reference in New Issue
Block a user