diff options
author | Tectu <joel@unormal.org> | 2012-06-25 12:44:35 +0200 |
---|---|---|
committer | Tectu <joel@unormal.org> | 2012-06-25 12:44:35 +0200 |
commit | ccf2780be97616371395c974f1f59d1f664e32af (patch) | |
tree | bc30a8b574012029f17dfca1fadd569c82f6aad4 | |
parent | 9e5cd3140a56c3097b62029994cc33216e823c36 (diff) | |
download | uGFX-ccf2780be97616371395c974f1f59d1f664e32af.tar.gz uGFX-ccf2780be97616371395c974f1f59d1f664e32af.tar.bz2 uGFX-ccf2780be97616371395c974f1f59d1f664e32af.zip |
lld GPIO lsb/msb order fix
-rw-r--r-- | drivers/lcd/ssd1289_lld.c | 8 | ||||
-rw-r--r-- | readme | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/drivers/lcd/ssd1289_lld.c b/drivers/lcd/ssd1289_lld.c index 9992ec93..5d5184a5 100644 --- a/drivers/lcd/ssd1289_lld.c +++ b/drivers/lcd/ssd1289_lld.c @@ -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) { @@ -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 |