circuitpython/ports/esp32s2/common-hal
Scott Shawcroft 40118bcf57
Add board_deinit for use with sleep
This changes lots of files to unify `board.h` across ports. It adds
`board_deinit` when CIRCUITPY_ALARM is set. `main.c` uses it to
deinit the board before deep sleeping (even when pretending.)

Deep sleep is now a two step process for the port. First, the
port should prepare to deep sleep based on the given alarms. It
should set alarms for both deep and pretend sleep. In particular,
the pretend versions should be set immediately so that we don't
miss an alarm as we shutdown. These alarms should also wake from
`port_idle_until_interrupt` which is used when pretending to deep
sleep.

Second, when real deep sleeping, `alarm_enter_deep_sleep` is called.
The port should set any alarms it didn't during prepare based on
data it saved internally during prepare.

ESP32-S2 sleep is a bit reorganized to locate more logic with
TimeAlarm. This will help it scale to more alarm types.

Fixes #3786
2020-12-08 10:52:25 -08:00
..
alarm Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
analogio Merge branch 'esp32-analogin' into esp32-analogout 2020-10-08 12:42:00 -04:00
board Initial ESP32S2 port. 2020-05-15 15:36:16 -07:00
busio Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
canio esp32s2: canio: respond to review comments 2020-10-26 19:18:37 -05:00
countio update peripherals_pcnt_init() 2020-11-06 01:42:20 +05:30
digitalio change idf to espressif 2020-10-08 00:52:00 +07:00
displayio Add board.DISPLAY to MagTag. Fix luma computation 2020-11-13 18:57:52 -08:00
frequencyio update init_timer & frequency calculation 2020-11-18 12:24:48 +05:30
microcontroller merge from upstream 2020-11-27 16:06:57 -05:00
neopixel_write Add GPIO reset to end of neopixel-write 2020-11-02 17:15:19 -05:00
nvm use values pointer directly 2020-11-24 11:44:11 +05:30
os Add random to ESP32-S2, fix it on STM32 2020-08-25 14:00:29 -04:00
ps2io re-organize and clean-up 2020-11-19 15:30:15 +05:30
pulseio esp32s2: PulseIn: Fix supervisor tick enabling 2020-11-17 17:45:41 -06:00
pwmio Change submodule, rework all includes 2020-09-30 11:26:07 -04:00
rotaryio Update rotaryio implementation 2020-11-08 11:12:32 +05:30
rtc wip 2020-11-22 19:10:09 -05:00
socketpool Two minor socket changes 2020-11-30 18:39:50 -08:00
ssl Change submodule, rework all includes 2020-09-30 11:26:07 -04:00
supervisor wip 2020-11-22 19:10:09 -05:00
time merge from upstream + wip 2020-11-25 17:52:06 -05:00
touchio reset touchin on every vm run 2020-11-26 11:22:44 +05:30
watchdog Add watchdog mode raise 2020-11-14 11:41:14 +05:30
wifi Merge pull request #3800 from BennyE/wifi-better-logs 2020-12-07 12:32:15 -08:00