Massively sped up lcd_putchar's handling of '\n'

This commit is contained in:
2025-09-21 10:51:08 +02:00
parent 52a232f1e9
commit aa84a2c03b

View File

@@ -163,11 +163,8 @@ void lcd_init(void) {
// Puts a character to the LCD. Correctly handles '\n'.
void lcd_putchar(char c) {
if(c == 10) {
while((lcd_pos != 0) && (lcd_pos != 40)) {
lcd_send_data(32);
lcd_pos++;
if(lcd_pos == 80) lcd_pos=0;
}
if(lcd_pos < 40) lcd_pos = 40;
else lcd_pos = 0;
} else {
lcd_send_data(c);
lcd_pos++;