OLED display reset now by oledInit()
This commit is contained in:
parent
4ee9ff7bf5
commit
f8db281869
@ -68,21 +68,11 @@ void init_display(bool verbose) {
|
|||||||
ESP_LOGV(TAG, "[%0.3f] i2c mutex lock failed", millis() / 1000.0);
|
ESP_LOGV(TAG, "[%0.3f] i2c mutex lock failed", millis() / 1000.0);
|
||||||
else {
|
else {
|
||||||
|
|
||||||
// is we have display RST line we toggle it to re-initialize display
|
|
||||||
#ifdef MY_OLED_RST
|
|
||||||
pinMode(MY_OLED_RST, OUTPUT);
|
|
||||||
digitalWrite(MY_OLED_RST, 0); // initialization of SSD1306 chip is executed
|
|
||||||
delay(1); // keep RES low for at least 3us according to SSD1306 datasheet
|
|
||||||
digitalWrite(MY_OLED_RST, 1); // normal operation
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// init display
|
// init display
|
||||||
#ifndef DISPLAY_FLIP
|
#ifndef DISPLAY_FLIP
|
||||||
oledInit(OLED_128x64, false, false, -1, -1,
|
oledInit(OLED_128x64, false, false, -1, -1, MY_OLED_RST, 400000L);
|
||||||
MY_OLED_RST == NOT_A_PIN ? -1 : MY_OLED_RST, 400000L);
|
|
||||||
#else
|
#else
|
||||||
oledInit(OLED_128x64, true, false, -1, -1,
|
oledInit(OLED_128x64, true, false, -1, -1, MY_OLED_RST, 400000L);
|
||||||
MY_OLED_RST == NOT_A_PIN ? -1 : MY_OLED_RST, 400000L);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// set display buffer
|
// set display buffer
|
||||||
|
@ -46,11 +46,9 @@ void start_ota_update() {
|
|||||||
#ifdef HAS_DISPLAY
|
#ifdef HAS_DISPLAY
|
||||||
|
|
||||||
#ifndef DISPLAY_FLIP
|
#ifndef DISPLAY_FLIP
|
||||||
oledInit(OLED_128x64, false, false, -1, -1,
|
oledInit(OLED_128x64, false, false, -1, -1, MY_OLED_RST, 400000L);
|
||||||
MY_OLED_RST == NOT_A_PIN ? -1 : MY_OLED_RST, 400000L);
|
|
||||||
#else
|
#else
|
||||||
oledInit(OLED_128x64, true, false, -1, -1,
|
oledInit(OLED_128x64, true, false, -1, -1, MY_OLED_RST, 400000L);
|
||||||
MY_OLED_RST == NOT_A_PIN ? -1 : MY_OLED_RST, 400000L);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// set display buffer
|
// set display buffer
|
||||||
|
Loading…
Reference in New Issue
Block a user