Massively sped up lcd_putchar's handling of '\n'
This commit is contained in:
@@ -163,11 +163,8 @@ void lcd_init(void) {
|
|||||||
// Puts a character to the LCD. Correctly handles '\n'.
|
// Puts a character to the LCD. Correctly handles '\n'.
|
||||||
void lcd_putchar(char c) {
|
void lcd_putchar(char c) {
|
||||||
if(c == 10) {
|
if(c == 10) {
|
||||||
while((lcd_pos != 0) && (lcd_pos != 40)) {
|
if(lcd_pos < 40) lcd_pos = 40;
|
||||||
lcd_send_data(32);
|
else lcd_pos = 0;
|
||||||
lcd_pos++;
|
|
||||||
if(lcd_pos == 80) lcd_pos=0;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
lcd_send_data(c);
|
lcd_send_data(c);
|
||||||
lcd_pos++;
|
lcd_pos++;
|
||||||
|
Reference in New Issue
Block a user