kopia lustrzana https://github.com/Xinyuan-LilyGO/TTGO-T-Display
Porównaj commity
5 Commity
8216f70be4
...
0ea2227425
Autor | SHA1 | Data |
---|---|---|
lewishe | 0ea2227425 | |
Lewis He | fd09f45962 | |
Lewis He | dcf80534c8 | |
Tim Strasser | 2b3d2b47c8 | |
Jesse Koester | e72edbb5a8 |
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2020 Xinyuan-LilyGO
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -3,9 +3,11 @@
|
|||
#include "WiFi.h"
|
||||
#include <Wire.h>
|
||||
#include "Button2.h"
|
||||
#include "esp_adc_cal.h"
|
||||
#include <esp_adc_cal.h>
|
||||
#include "bmp.h"
|
||||
|
||||
#include "driver/rtc_io.h"
|
||||
|
||||
|
||||
// TFT Pins has been set in the TFT_eSPI library in the User Setup file TTGO_T_Display.h
|
||||
// #define TFT_MOSI 19
|
||||
|
@ -109,6 +111,10 @@ void button_init()
|
|||
//After using light sleep, you need to disable timer wake, because here use external IO port to wake up
|
||||
esp_sleep_disable_wakeup_source(ESP_SLEEP_WAKEUP_TIMER);
|
||||
// esp_sleep_enable_ext1_wakeup(GPIO_SEL_35, ESP_EXT1_WAKEUP_ALL_LOW);
|
||||
rtc_gpio_init(GPIO_NUM_14);
|
||||
rtc_gpio_set_direction(GPIO_NUM_14, RTC_GPIO_MODE_OUTPUT_ONLY);
|
||||
rtc_gpio_set_level(GPIO_NUM_14, 1);
|
||||
delay(500);
|
||||
esp_sleep_enable_ext0_wakeup(GPIO_NUM_35, 0);
|
||||
delay(200);
|
||||
esp_deep_sleep_start();
|
||||
|
|
Ładowanie…
Reference in New Issue