Power down OLED before deep sleep
This commit is contained in:
@@ -50,6 +50,17 @@ static void oled_set_power(bool on) {
|
||||
}
|
||||
}
|
||||
|
||||
void display_power_down() {
|
||||
if (!g_display_ready) {
|
||||
return;
|
||||
}
|
||||
display.clearDisplay();
|
||||
display.display();
|
||||
oled_set_power(false);
|
||||
g_oled_on = false;
|
||||
g_last_oled_on = false;
|
||||
}
|
||||
|
||||
void display_init() {
|
||||
pinMode(PIN_OLED_CTRL, INPUT_PULLDOWN);
|
||||
Wire.begin(PIN_OLED_SDA, PIN_OLED_SCL);
|
||||
|
||||
Reference in New Issue
Block a user