From 0e14c81df23641185e47cefc5a0d6daa7c722afc Mon Sep 17 00:00:00 2001 From: Paul Klinger Date: Fri, 8 Feb 2019 17:55:52 +0100 Subject: [PATCH] use lcd_goto_xpix_y for lcd_gotoxy --- lcd.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lcd.c b/lcd.c index 9a6805c..f19c8e9 100644 --- a/lcd.c +++ b/lcd.c @@ -119,16 +119,8 @@ void lcd_init(uint8_t dispAttr){ lcd_clrscr(); } void lcd_gotoxy(uint8_t x, uint8_t y){ - if( x > (DISPLAY_WIDTH/sizeof(FONT[0])) || y > (DISPLAY_HEIGHT/8-1)) return;// out of display x = x * sizeof(FONT[0]); - cursorPosition.x=x; - cursorPosition.y=y; -#if defined SSD1306 - uint8_t commandSequence[] = {0xb0+y, 0x21, x, 0x7f}; -#elif defined SH1106 - uint8_t commandSequence[] = {0xb0+y, 0x21, 0x00+((2+x) & (0x0f)), 0x10+( ((2+x) & (0xf0)) >> 4 ), 0x7f}; -#endif - lcd_command(commandSequence, sizeof(commandSequence)); + lcd_goto_xpix_y(x,y); } void lcd_goto_xpix_y(uint8_t x, uint8_t y){ if( x > (DISPLAY_WIDTH) || y > (DISPLAY_HEIGHT/8-1)) return;// out of display