Fix a very long standing bug with cursor decoding.

This commit is contained in:
H. Utku Maden 2023-03-23 11:39:03 +03:00
parent b8916d6411
commit 480a27cd34

@ -221,7 +221,6 @@ int lcdWrite(lcdDriver_t *driver, uint8_t data);
*/
#define LCD_DECODE_CURSOR(driver)\
((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 */\
(driver)->dimensions.width * ((driver)->cursor.y >= 2) /* Add width if the row is the last two. */\