Commit Graph

11 Commits

Author SHA1 Message Date
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
Mark Roberts
b921543571 Requested changes take 1 2020-09-25 21:27:29 -04:00
nitz
8d6a28a9ff
Update user button names. 2020-09-18 17:01:44 -04:00
nitz
5249a228a0
More pin names cleanup. 2020-09-18 14:27:00 -04:00
nitz
db078922e4
Removed TXD/RXD, fixed whitespace. 2020-09-17 21:32:19 -04:00
Chris Dailey
be3e478fce
Add SDA & SDL, RX & TX to pins.c
Despite the [silk on the dock board](https://wiki.makerdiary.com/nrf52840-m2-devkit/resources/nrf52840_m2_devkit_hw_diagram_v1_0.pdf), the SDA/SCL pins weren't defined. Though, they were already defined in `mpconfigboard.h`.

Same for RX/TX. It looks like it declared `TXD` and `RXD`, so I didn't want to remove those, but I think it makes sense to have the "standard" pin names, but I moved ithem to illustrate they were all referencing the same pins.

I mimicked the whitespace I saw in the metro_nrf52840_express port.
2020-09-17 20:46:59 -04:00
Yihui Xiong
c8752ff93e use RGB LEDs as status indicators 2020-07-11 21:25:32 +08:00
Yihui Xiong
8e26fdc0e9 add LED status, remove unused macros 2020-07-11 10:51:31 +08:00
Yihui Xiong
7ff499046b use VID & PIDs granted by Seeed 2020-07-11 00:37:45 +08:00
Yihui Xiong
678f266394 fix pre-commit check 2020-07-09 10:25:46 +00:00
Yihui Xiong
e81d22cd67 add makerdiary nrf52840 m.2 devkit
Signed-off-by: Yihui Xiong <yihui.xiong@hotmail.com>
2020-07-09 10:01:04 +00:00