From 121e60655af40e2abee8ede37146f00c55682923 Mon Sep 17 00:00:00 2001 From: leptun Date: Thu, 18 Jul 2019 10:14:03 +0300 Subject: [PATCH] Fix lcd not initing after WDT reset --- Firmware/lcd.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Firmware/lcd.cpp b/Firmware/lcd.cpp index b2f90c6c..1f4e6e2f 100644 --- a/Firmware/lcd.cpp +++ b/Firmware/lcd.cpp @@ -196,8 +196,21 @@ static void lcd_putchar(char c, FILE *) void lcd_init(void) { + WRITE(LCD_PINS_ENABLE,LOW); SET_OUTPUT(LCD_PINS_RS); SET_OUTPUT(LCD_PINS_ENABLE); + +#ifdef LCD_8BIT + SET_OUTPUT(LCD_PINS_D0); + SET_OUTPUT(LCD_PINS_D1); + SET_OUTPUT(LCD_PINS_D2); + SET_OUTPUT(LCD_PINS_D3); +#endif + SET_OUTPUT(LCD_PINS_D4); + SET_OUTPUT(LCD_PINS_D5); + SET_OUTPUT(LCD_PINS_D6); + SET_OUTPUT(LCD_PINS_D7); + #ifdef LCD_8BIT lcd_displayfunction |= LCD_8BITMODE; #endif