Update lcd.c

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

@ -55,6 +55,9 @@ static struct {
#if defined GRAPHICMODE #if defined GRAPHICMODE
#include <stdlib.h> #include <stdlib.h>
static uint8_t displayBuffer[DISPLAY_HEIGHT/8][DISPLAY_WIDTH]; static uint8_t displayBuffer[DISPLAY_HEIGHT/8][DISPLAY_WIDTH];
#elif defined TEXTMODE
#else
#error "No valid displaymode! Refer lcd.h"
#endif #endif
@ -210,7 +213,7 @@ void lcd_putc(char c){
} }
} }
} }
if( (cursorPosition.x > 20) || if( (cursorPosition.x > DISPLAY_WIDTH-1-sizeof(FONT[0])) ||
(c == 0xff) ) return; (c == 0xff) ) return;
// print char at display // print char at display
#ifdef GRAPHICMODE #ifdef GRAPHICMODE

Loading…
Cancel
Save