circuitpython/ports/nrf/boards
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
..
ADM_B_NRF52840_1 Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
aramcon_badge_2019 Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
arduino_nano_33_ble Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
bless_dev_board_multi_sensor Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
circuitplayground_bluefruit Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
clue_nrf52840_express Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
electronut_labs_blip Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
electronut_labs_papyr Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
feather_bluefruit_sense Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
feather_nrf52840_express Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
hiibot_bluefi Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
ikigaisense_vita Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
itsybitsy_nrf52840_express Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
makerdiary_m60_keyboard Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
makerdiary_nrf52840_m2_devkit Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
makerdiary_nrf52840_mdk Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
makerdiary_nrf52840_mdk_usb_dongle Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
metro_nrf52840_express Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
nice_nano Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
ohs2020_badge Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
particle_argon Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
particle_boron Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
particle_xenon Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
pca10056 Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
pca10059 Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
pca10100 Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
pitaya_go Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
raytac_mdbt50q-db-40 Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
simmel Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
sparkfun_nrf52840_mini Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
teknikio_bluebird Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
TG-Watch02A Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
tinkeringtech_scoutmakes_azul Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
common.template.ld SPIM3 buffer must be in first 64kB of RAM 2020-08-15 10:31:56 -04:00
nrf52_prefix.c rename pin.h to nrf_pin.h to avoid conflict with Pin.h 2018-08-26 20:37:12 -04:00