From 64c964d318c6bda3488e6548db6a86f5716283cc Mon Sep 17 00:00:00 2001 From: Sylaina Date: Tue, 17 Mar 2020 07:13:48 +0100 Subject: [PATCH] Update lcd.c Modified init_sequence for different DISPLAY_HEIGHT --- lcd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lcd.c b/lcd.c index fec1c97..330d3c6 100644 --- a/lcd.c +++ b/lcd.c @@ -87,7 +87,12 @@ const uint8_t init_sequence [] PROGMEM = { // Initialization Sequence 0xD5, // --set display clock divide ratio/oscillator frequency 0xF0, // --set divide ratio 0xD9, 0x22, // Set pre-charge period - 0xDA, 0x12, // Set com pins hardware configuration + // Set com pins hardware configuration +#if DISPLAY_HEIGHT==64 + 0xDA, 0x12, +#elif DISPLAY_HEIGHT==32 + 0xDA, 0x02, +#endif 0xDB, // --set vcomh 0x20, // 0x20,0.77xVcc 0x8D, 0x14, // Set DC-DC enable