use lcd_goto_xpix_y for lcd_gotoxy
Dieser Commit ist enthalten in:
Ursprung
834f7875a3
Commit
0e14c81df2
10
lcd.c
10
lcd.c
@ -119,16 +119,8 @@ void lcd_init(uint8_t dispAttr){
|
|||||||
lcd_clrscr();
|
lcd_clrscr();
|
||||||
}
|
}
|
||||||
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
|
|
||||||
x = x * sizeof(FONT[0]);
|
x = x * sizeof(FONT[0]);
|
||||||
cursorPosition.x=x;
|
lcd_goto_xpix_y(x,y);
|
||||||
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));
|
|
||||||
}
|
}
|
||||||
void lcd_goto_xpix_y(uint8_t x, uint8_t 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
|
if( x > (DISPLAY_WIDTH) || y > (DISPLAY_HEIGHT/8-1)) return;// out of display
|
||||||
|
Laden…
x
In neuem Issue referenzieren
Einen Benutzer sperren