From de13291db16683c2e96ee07cb7e861d89fe46772 Mon Sep 17 00:00:00 2001 From: JivaroFAD Date: Wed, 20 May 2015 18:08:33 +0200 Subject: [PATCH] LCD driver simplification, 8 bytes saved (ST7565) --- radio/src/targets/stock/lcd_driver.cpp | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/radio/src/targets/stock/lcd_driver.cpp b/radio/src/targets/stock/lcd_driver.cpp index 2eebdb7cc..a203dc7c6 100644 --- a/radio/src/targets/stock/lcd_driver.cpp +++ b/radio/src/targets/stock/lcd_driver.cpp @@ -36,13 +36,6 @@ #include "opentx.h" -#define delay_1us() _delay_us(1) -#define delay_2us() _delay_us(2) -void delay_1_5us(uint16_t ms) -{ - for (uint16_t i=0; iSEG1) + 0xA0, //ADC = 0: normal direction (SEG132->SEG1) 0xA6, //REV = 0: non-reverse display 0xA4, //EON = 0: normal display. non-entire 0xA2, //Select LCD bias @@ -90,7 +83,7 @@ const static pm_uchar lcdInitSequence[] PROGMEM = #elif defined(LCD_ERC12864FSF) 0xE2, //Initialize the internal functions 0xAE, //DON = 0: display OFF - 0xA1, //ADC = 1: reverse direction(SEG132->SEG1) + 0xA1, //ADC = 1: reverse direction (SEG132->SEG1) 0xA6, //REV = 0: non-reverse display 0xA4, //EON = 0: normal display. non-entire 0xA3, //Select LCD bias @@ -126,18 +119,18 @@ inline void lcdInit() { LCD_LOCK(); PORTC_LCD_CTRL &= ~(1<