diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/lcd/ssd1289_lld.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/lcd/ssd1289_lld.c b/drivers/lcd/ssd1289_lld.c index f9fa0cfd..d1d34310 100644 --- a/drivers/lcd/ssd1289_lld.c +++ b/drivers/lcd/ssd1289_lld.c @@ -9,8 +9,10 @@ extern uint16_t lcd_width, lcd_height; #ifdef LCD_USE_GPIO static __inline lld_lcdWriteGPIO(uint16_t d) { - LCD_DATA_PORT_1->BSRR = (((~d >> 8) << 16) | (d >> 8) << LCD_DATA_PORT_1_BASE); - LCD_DATA_PORT_2->BSRR = (((~d & 0xFF) << 16) | (d & 0xFF) << LCD_DATA_PORT_2_BASE); + LCD_DATA_PORT_1->BSRR = ((((~d >> 12 & 0xF) << 16) | (d >> 12 & 0xF)) << LCD_DATA_PORT_1_BASE); + LCD_DATA_PORT_2->BSRR = ((((~d >> 8 & 0xF) << 16) | (d >> 8 & 0xF)) << LCD_DATA_PORT_2_BASE); + LCD_DATA_PORT_3->BSRR = ((((~d >> 4 & 0xF) << 16) | (d >> 4 & 0xF)) << LCD_DATA_PORT_3_BASE); + LCD_DATA_PORT_4->BSRR = ((((~d >> 0 & 0xF) << 16) | (d >> 0 & 0xF)) << LCD_DATA_PORT_4_BASE); } static __inline void lld_lcdWriteIndex(uint16_t index) { |