circuitpython/ports/atmel-samd/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
..
_pew atmel-samd: Add support for SAM E54 family MCUs 2020-06-23 10:41:48 -05:00
analogio samd: AnalogOut: Better handle boards which IGNOREd analog pins 2020-10-17 20:08:32 -05:00
audiobusio samd: PDMIn: Reduce code unrolling on samd21 only 2020-11-19 16:19:37 -06:00
audioio atmel-samd: Add support for SAM E54 family MCUs 2020-06-23 10:41:48 -05:00
board Add license to some obvious files. 2020-07-06 19:16:25 +01:00
busio Add `board_deinit` for use with sleep 2020-12-08 10:52:25 -08:00
canio canio: remove unused fields 2020-10-06 20:14:50 -05:00
countio Fix up end of file and trailing whitespace. 2020-06-03 10:56:35 +01:00
digitalio Update digitalio api for other ports 2020-05-20 09:23:42 -07:00
displayio Update parallel bus signatures 2020-11-13 18:57:52 -08:00
frequencyio supervisor: factor supervisor_background_tasks from sundry ports 2020-07-15 11:49:44 -05:00
i2cperipheral I2CPeripheral: Rename class and its module 2020-06-25 11:44:19 -05:00
microcontroller address review comments 2020-12-01 20:01:14 -05:00
neopixel_write atmel-samd: add same51, feather_m4_can 2020-09-08 13:06:45 -05:00
nvm wip 2020-01-03 10:24:07 -05:00
os atmel-samd: Add support for SAM E54 family MCUs 2020-06-23 10:41:48 -05:00
ps2io Initial work on SAMD 2020-03-13 11:16:41 -07:00
pulseio Finer grained, per port tick locking 2020-10-12 18:43:21 -07:00
pwmio Split pulseio.PWMOut into pwmio 2020-08-18 13:08:33 -07:00
rgbmatrix RGBMatrix: finish renaming from Protomatter 2020-04-17 18:44:07 -05:00
rotaryio typo in IncrementalEncoder.c 2019-08-20 16:23:17 -04:00
rtc Combine similar strings to reduce size of translations 2020-08-04 13:34:29 -05:00
sdioio Add `board_deinit` for use with sleep 2020-12-08 10:52:25 -08:00
supervisor Fix up end of file and trailing whitespace. 2020-06-03 10:56:35 +01:00
touchio fix up SAMD21 sleep 2020-03-17 12:10:35 -07:00