Skip to content

Commit 0e14c81

Browse files
committed
use lcd_goto_xpix_y for lcd_gotoxy
1 parent 834f787 commit 0e14c81

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

lcd.c

+1-9
Original file line numberDiff line numberDiff line change
@@ -119,16 +119,8 @@ void lcd_init(uint8_t dispAttr){
119119
lcd_clrscr();
120120
}
121121
void lcd_gotoxy(uint8_t x, uint8_t y){
122-
if( x > (DISPLAY_WIDTH/sizeof(FONT[0])) || y > (DISPLAY_HEIGHT/8-1)) return;// out of display
123122
x = x * sizeof(FONT[0]);
124-
cursorPosition.x=x;
125-
cursorPosition.y=y;
126-
#if defined SSD1306
127-
uint8_t commandSequence[] = {0xb0+y, 0x21, x, 0x7f};
128-
#elif defined SH1106
129-
uint8_t commandSequence[] = {0xb0+y, 0x21, 0x00+((2+x) & (0x0f)), 0x10+( ((2+x) & (0xf0)) >> 4 ), 0x7f};
130-
#endif
131-
lcd_command(commandSequence, sizeof(commandSequence));
123+
lcd_goto_xpix_y(x,y);
132124
}
133125
void lcd_goto_xpix_y(uint8_t x, uint8_t y){
134126
if( x > (DISPLAY_WIDTH) || y > (DISPLAY_HEIGHT/8-1)) return;// out of display

0 commit comments

Comments
 (0)