circuitpython/shared-bindings
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
..
_bleio Replace _bleio.ConnectionError with the native version 2020-10-07 17:11:32 -07:00
_eve Modify some Python stubs 2020-08-07 01:01:28 +09:00
_pew Modify some Python stubs 2020-08-07 01:01:28 +09:00
_pixelbuf use the stack 2020-08-10 18:42:05 -04:00
_stage Modify some Python stubs 2020-08-07 01:01:28 +09:00
_typing fix stub problems; touch up doc 2020-11-27 23:27:15 -05:00
adafruit_bus_device Fixing stubs 2020-12-01 17:49:15 -06:00
aesio Modify some Python stubs 2020-08-07 01:01:28 +09:00
alarm Add `board_deinit` for use with sleep 2020-12-08 10:52:25 -08:00
analogio Fix several type hints 2020-07-27 18:05:13 +09:00
audiobusio Modify some Python stubs 2020-08-07 01:01:28 +09:00
audiocore Modify some Python stubs 2020-08-07 01:01:28 +09:00
audioio Modify some Python stubs 2020-08-07 01:01:28 +09:00
audiomixer Modify some Python stubs 2020-08-07 01:01:28 +09:00
audiomp3 Modify some Python stubs 2020-08-07 01:01:28 +09:00
audiopwmio wip 2020-11-22 19:10:09 -05:00
bitbangio Modify some Python stubs 2020-08-07 01:01:28 +09:00
board Fix lost board.SPI and board.I2C after explicitly deiniting them. 2020-10-26 22:44:38 +01:00
busio Change I2C default to 100khz 2020-09-25 11:07:22 -07:00
camera camera: Pass width and height to take_picture() 2020-09-16 13:55:57 +02:00
canio wip; not compiling yet 2020-11-19 17:47:12 -05:00
countio Fix several type hints 2020-07-27 18:05:13 +09:00
digitalio Fix several type hints 2020-07-27 18:05:13 +09:00
displayio displayio: Fix ColorConverter make_* methods 2020-11-25 03:39:14 +01:00
fontio Modify some Python stubs 2020-08-07 01:01:28 +09:00
framebufferio Modify some Python stubs 2020-08-07 01:01:28 +09:00
frequencyio Fix several type hints 2020-07-27 18:05:13 +09:00
gamepad Add and correct some type hints 2020-07-24 18:20:03 +09:00
gamepadshift Add and correct some type hints 2020-07-24 18:20:03 +09:00
gnss remove extraneous files 2020-08-21 19:08:25 -05:00
i2cperipheral merge from upstream + wip 2020-11-25 17:52:06 -05:00
ipaddress Fixing remaining stub mypy issues + run check-stubs to CI 2020-10-30 18:56:40 -04:00
math Add and correct some type hints 2020-07-24 18:20:03 +09:00
memorymonitor remove extraneous files 2020-08-21 19:08:25 -05:00
microcontroller Make ResetReason and RunReason available 2020-12-06 12:00:00 -05:00
multiterminal Modify some Python stubs 2020-08-07 01:01:28 +09:00
neopixel_write Modify some Python stubs 2020-08-07 01:01:28 +09:00
network Modify some Python stubs 2020-08-07 01:01:28 +09:00
nvm Modify some Python stubs 2020-08-07 01:01:28 +09:00
os Modify some Python stubs 2020-08-07 01:01:28 +09:00
ps2io fix crash on user code exit 2020-11-19 11:44:22 +05:30
pulseio Add empty lines 2020-08-21 11:36:50 -07:00
pwmio Split pulseio.PWMOut into pwmio 2020-08-18 13:08:33 -07:00
random merge from upstream + wip 2020-11-25 17:52:06 -05:00
rgbmatrix RGBMatrix: Detect invalid bit_depth selection 2020-11-09 08:27:46 -06:00
rotaryio Remove warning about lack of support on M0 from rotaryio 2020-12-08 15:54:34 +01:00
rtc Fix several type hints 2020-07-27 18:05:13 +09:00
sdcardio remove extraneous files 2020-08-21 19:08:25 -05:00
sdioio remove other extraneous files 2020-08-21 19:10:13 -05:00
sharpdisplay sharpmemory: Implement support for Sharp Memory Displays in framebufferio 2020-08-12 07:32:18 -05:00
socket Removing implementation-specific values for socket/socketpool class attributes 2020-11-02 19:59:07 -05:00
socketpool Fix stubs 2020-11-24 11:32:18 -05:00
ssl Fixing make stub warnings and mypy issuesmak 2020-10-29 20:15:34 -04:00
storage Modify some Python stubs 2020-08-07 01:01:28 +09:00
struct Modify some Python stubs 2020-08-07 01:01:28 +09:00
supervisor Make ResetReason and RunReason available 2020-12-06 12:00:00 -05:00
terminalio Modify some Python stubs 2020-08-07 01:01:28 +09:00
time merge from upstream + wip 2020-11-25 17:52:06 -05:00
touchio Fix several type hints 2020-07-27 18:05:13 +09:00
uheap Add and correct some type hints 2020-07-24 18:20:03 +09:00
usb_hid MIssed one change for .last_received_report 2020-09-10 14:21:36 -04:00
usb_midi address review; use constructor for HCI Adapter 2020-08-30 14:06:48 -04:00
ustack Added type hints to ustack 2020-07-03 15:52:53 -04:00
vectorio Modify some Python stubs 2020-08-07 01:01:28 +09:00
watchdog move port specific check 2020-11-11 00:24:01 +05:30
wifi Include wifi.radio singleton in gc 2020-12-07 11:07:56 -05:00
wiznet Modify some Python stubs 2020-08-07 01:01:28 +09:00
help.rst Apply a Sphinx transform to make the core module docs look better 2020-08-07 00:01:31 +09:00
index.rst docs: Improve 5.0.x <-> main branch doc linkrot 2020-06-14 11:12:35 -05:00
support_matrix.rst support_matrix.rst: pre-process space chars in internal link names; would cause a no-id situation when names like 'ndGarage[n°] Bit6: FeatherSnow-v2' were parsed. 2020-08-08 11:37:49 -05:00
util.c Refactor deinit check to reduce code size. 2019-06-12 11:36:43 -07:00
util.h Refactor deinit check to reduce code size. 2019-06-12 11:36:43 -07:00