Skip to content

Commit

Permalink
fix the poweroff api
Browse files Browse the repository at this point in the history
  • Loading branch information
0x1abin committed Nov 9, 2017
1 parent d18abc1 commit 0cfb1b1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/M5Stack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ void M5Stack::powerOFF() {

// ESP32 into deep sleep
uint64_t _wakeupPin_mask = 1ULL << _wakeupPin;
USE_SERIAL.printf("Enabling EXT1 wakeup on pins GPIO%d\n", _wakeupPin);
esp_deep_sleep_enable_ext0_wakeup((gpio_num_t)_wakeupPin_mask , 0);
USE_SERIAL.printf("Enabling EXT0 wakeup on pins GPIO%d\n", _wakeupPin);
esp_deep_sleep_enable_ext0_wakeup((gpio_num_t)_wakeupPin , LOW);

while(digitalRead(_wakeupPin) == LOW) {
delay(10);
Expand Down
4 changes: 4 additions & 0 deletions src/utility/Display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3087,6 +3087,10 @@ void ILI9341::clearDisplay() {
fillScreen(0x0000);
}

void ILI9341::clear() {
clearDisplay();
}

void ILI9341::display() {
}
/***************************************************
Expand Down
3 changes: 2 additions & 1 deletion src/utility/Display.h
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,8 @@ class ILI9341 : public Print
progressBar(int x, int y, int w, int h, uint8_t val),
setAddrWindow(int32_t xs, int32_t ys, int32_t xe, int32_t ye),
display(),
clearDisplay();
clearDisplay(),
clear();

void startWrite(void);
void endWrite(void);
Expand Down

0 comments on commit 0cfb1b1

Please sign in to comment.