circuitpython/supervisor/shared
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
..
external_flash Add movable allocation system. 2020-11-28 17:50:23 +01:00
usb wip 2020-11-22 19:10:09 -05:00
autoreload.c Updates based on feedback from jepler 2020-04-06 16:03:31 -07:00
autoreload.h Refine _bleio 2019-10-21 18:57:03 -07:00
background_callback.c Unify iMX flash config and add Metro M7 1011 2020-10-07 15:23:47 -07:00
bluetooth.c wip: advertising; not tested 2020-07-12 19:45:23 -04:00
bluetooth.h wip: compiles 2020-08-02 11:36:38 -04:00
board.c Add `board_deinit` for use with sleep 2020-12-08 10:52:25 -08:00
board.h Add `board_deinit` for use with sleep 2020-12-08 10:52:25 -08:00
display.c Use movable allocation system for terminal tilegrid. 2020-11-28 17:54:34 +01:00
display.h Turn off terminalio for ja and ko 2020-08-17 17:17:59 -07:00
filesystem.c Unify iMX flash config and add Metro M7 1011 2020-10-07 15:23:47 -07:00
flash.c Unify iMX flash config and add Metro M7 1011 2020-10-07 15:23:47 -07:00
internal_flash.h Hopefully fix flash flush and hopefully audio as well. 2020-03-13 11:12:31 -07:00
memory.c Eliminate goto. 2020-11-30 23:33:38 +01:00
micropython.c supervisor: use mp_handle_pending to check for exceptions 2020-08-23 09:12:01 -05:00
rgb_led_colors.h Reduce DotStar status brightness; macros for status colors 2019-11-01 13:37:36 -04:00
rgb_led_status.c wip; not compiling yet 2020-11-19 17:47:12 -05:00
rgb_led_status.h wip 2020-11-19 15:43:39 -05:00
safe_mode.c wip: ResetReason to microcontroller.cpu 2020-11-21 23:29:52 -05:00
safe_mode.h Add some NORETURN attributes 2020-09-28 18:55:56 -05:00
serial.c wip; not compiling yet 2020-11-19 17:47:12 -05:00
stack.c Add movable allocation system. 2020-11-28 17:50:23 +01:00
stack.h Add movable allocation system. 2020-11-28 17:50:23 +01:00
status_leds.c Add feature conditionals and clean up 2019-07-22 12:58:28 -04:00
status_leds.h Move atmel-samd to tinyusb and support nRF flash. 2018-11-08 17:25:30 -08:00
tick.c Add `board_deinit` for use with sleep 2020-12-08 10:52:25 -08:00
tick.h supervisor: factor supervisor_background_tasks from sundry ports 2020-07-15 11:49:44 -05:00
translate.c Small improvements to the dictionary compression 2020-09-14 01:50:01 +09:00
translate.h supervisor translate: explain the dictionary 2020-09-15 13:18:04 -05:00
workflow.c working! PinAlarm not implemented yet. 2020-11-27 16:03:37 -05:00
workflow.h merge from upstream + wip 2020-11-25 17:52:06 -05:00