Update lcd.c

pull/7/head
Sylaina 6 years ago committed by GitHub
parent 052b5f8509
commit 61ca2e1dc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -119,9 +119,9 @@ void lcd_init(uint8_t dispAttr){
} }
void lcd_gotoxy(uint8_t x, uint8_t y){ 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 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.x=x;
cursorPosition.y=y; cursorPosition.y=y;
x = x * sizeof(FONT[0]);
#if defined SSD1306 #if defined SSD1306
uint8_t commandSequence[] = {0xb0+y, 0x21, x, 0x7f}; uint8_t commandSequence[] = {0xb0+y, 0x21, x, 0x7f};
#elif defined SH1106 #elif defined SH1106

Loading…
Cancel
Save