circuitpython/ports/atmel-samd/common-hal/busio
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
..
__init__.c Merge commit 'f869d6b2e339c04469c6c9ea3fb2fabd7bbb2d8c' into nrf2_merge 2017-10-24 22:31:16 -07:00
I2C.c Make requiring I2C pullups be optional 2020-01-09 17:31:50 -05:00
I2C.h add pin claiming to devices 2018-08-31 18:38:05 -04:00
OneWire.h Merge commit 'f869d6b2e339c04469c6c9ea3fb2fabd7bbb2d8c' into nrf2_merge 2017-10-24 22:31:16 -07:00
SPI.c Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
SPI.h Add support for grayscale displays that are < 8 bit depth. 2019-07-19 16:06:11 -07:00
UART.c Add license to some obvious files. 2020-07-06 19:16:25 +01:00
UART.h UART fixes and enhancements; default board object fix 2018-09-12 17:19:43 -04:00