mirror of
https://github.com/utkumaden/esp-idf-lcd.git
synced 2025-01-23 06:06:32 +01:00
Fix a very long standing bug with cursor decoding.
This commit is contained in:
parent
b8916d6411
commit
480a27cd34
@ -221,12 +221,11 @@ int lcdWrite(lcdDriver_t *driver, uint8_t data);
|
|||||||
*/
|
*/
|
||||||
#define LCD_DECODE_CURSOR(driver)\
|
#define LCD_DECODE_CURSOR(driver)\
|
||||||
((driver)->cursor.x + /* Base position */\
|
((driver)->cursor.x + /* Base position */\
|
||||||
((driver)->dimensions.height > 2) * /* If the display has more than 2 lines. */\
|
( \
|
||||||
( \
|
64 * ((driver)->cursor.y % 2) + /* Add 64 if the row is even */\
|
||||||
64 * ((driver)->cursor.y % 2) + /* Add 64 if the row is even */\
|
(driver)->dimensions.width * ((driver)->cursor.y >= 2) /* Add width if the row is the last two. */\
|
||||||
(driver)->dimensions.width * ((driver)->cursor.y >= 2) /* Add width if the row is the last two. */\
|
) \
|
||||||
) \
|
)
|
||||||
)
|
|
||||||
// #include <stdio.h>
|
// #include <stdio.h>
|
||||||
// inline static uint8_t _LCD_DECODE_CURSOR(lcdDriver_t* driver) {
|
// inline static uint8_t _LCD_DECODE_CURSOR(lcdDriver_t* driver) {
|
||||||
// uint8_t value = LCD_DECODE_CURSOR(driver);
|
// uint8_t value = LCD_DECODE_CURSOR(driver);
|
||||||
|
Loading…
Reference in New Issue
Block a user