Commit Graph

33 Commits

Author SHA1 Message Date
Dan Halbert ded134c346 store wake_alarm in a static object 2022-10-29 16:26:36 -04:00
Dan Halbert 9307b62ad5 wip 2022-10-27 22:42:04 -04:00
Dan Halbert 60f43b1703 allow preserving pin state during deep sleep 2022-09-15 17:35:14 -04:00
root 8668dee3df Fix declaration of print_wakeup_cause 2022-06-14 20:51:07 -05:00
root 669e45497c Uncommented call to print_wakeup_cause 2022-06-14 13:27:15 -05:00
root 015e95807a Fix for Issue #6478 2022-06-14 12:14:05 -05:00
Jeff Epler 9e799a7c74
-Werror=missing-prototypes for nRF 2021-11-10 11:26:54 -06:00
Scott Shawcroft fa9c2189d4
Fix nrf light_sleep when on usb
Don't let pending serial input wake us up

Fixes #5257
2021-08-30 18:26:12 -07:00
Scott Shawcroft cdf978f3af
Fix a couple fake sleep bugs on nrf and esp
On ESP ctrl-c during fake sleep will now stop the sleep. A crash
on real deep sleep is now fixed as well. (Exception string saving
was crashing on reading the deep sleep exception.) Fixes #4010

This also fixes nRF fake sleep after the first time. The internal
variable wasn't being reset early enough. Fixes #4869
2021-07-28 13:27:48 -07:00
Scott Shawcroft 0fadf028ef
Create first BLE-only board, Micro:Bit v2
This fixes build issues with USB off, tweaks the README to allow
for BLE-only boards and adds the Micro:Bit v2 definition.

Fixes #4546
2021-07-14 09:55:51 -07:00
Lucian Copeland 715f7ee490 Add STM32 and NRF52 compatibility 2021-05-14 14:34:35 -04:00
Jeff Epler e95e921ca1 codeformat: Fix filename matching
In #4683, tannewt noticed that uncrustify was not running on some
file in common-hal.

I investigated and found that it was not being run on a bunch of paths.

Rather than make incremental changes, I rewrote list_files to work
bsaed on regular expressions; these regular expressions are created from
the same git-style glob patterns.

I spot-checked some specific filenames after this change, and all looks good:

```
$ python3 tools/codeformat.py -v --dry-run tests/basics/int_small.py ports/raspberrypi/common-hal/pulseio/PulseIn.c extmod/virtpin.c tests/thread/thread_exit1.py  ports/raspberrypi/background.h extmod/re1.5/recursiveloop.c
tools/codeformat.py -v --dry-run tests/basics/int_small.py ports/raspberrypi/common-hal/pulseio/PulseIn.c extmod/virtpin.c tests/thread/thread_exit1.py ports/raspberrypi/background.h extmod/re1.5/recursiveloop.c
uncrustify -c /home/jepler/src/circuitpython/tools/uncrustify.cfg -lC --no-backup extmod/virtpin.c ports/raspberrypi/background.h ports/raspberrypi/common-hal/pulseio/PulseIn.c
black --fast --line-length=99 -v tests/thread/thread_exit1.py
```
recursiveloop and int_small are excluded, while PulseIn, virtpin,
and background are included.

Testing running from a subdirectory (not _specifically_ supported though):
```
(cd ports && python3 ../tools/codeformat.py -v --dry-run raspberrypi/common-hal/pulseio/PulseIn.c ../extmod/virtpin.c)
../tools/codeformat.py -v --dry-run raspberrypi/common-hal/pulseio/PulseIn.c ../extmod/virtpin.c
uncrustify -c /home/jepler/src/circuitpython/tools/uncrustify.cfg -lC --no-backup ../extmod/virtpin.c raspberrypi/common-hal/pulseio/PulseIn.
```

As a side-effect, a bunch more files are re-formatted now. :-P
2021-04-30 10:48:08 -05:00
Lucian Copeland 43840363c2 Fix submodule 2021-04-26 17:59:21 -04:00
jun2sak 872fff7fbb simplify system_on_idle_until_alarm() 2021-04-25 23:59:21 +09:00
jun2sak 7accb8b173 modify copyright notice. 2021-04-25 19:57:21 +09:00
jun2sak a17fcb6d1a add copyright notice. remove obsolete comments. 2021-04-25 19:19:11 +09:00
jun2sak 6e9429d779 soft reboot for pretending deep sleep. 2021-04-12 20:53:14 +09:00
Lucian Copeland 15764b4c24 Merge remote-tracking branch 'upstream/main' into nrf52-sleep 2021-04-09 13:48:45 -04:00
jun2sak c8f36e604c reset myself, not go REPL, after wakeup from deep sleep. 2021-03-09 00:42:22 +09:00
jun2sak 2eed9a1735 old System OFF sleep code for future reference. 2021-03-07 20:21:33 +09:00
jun2sak 2795c002ad disable QSPI while system ON idle loop. 2021-03-07 19:14:04 +09:00
jun2sak 3fab9f8b1b new wait-until-alarm design, don't use System OFF. 2021-03-07 01:09:54 +09:00
jun2sak 3e47e00291 address the pretending-to-deep-sleep issue. 2021-02-28 15:57:37 +09:00
jun2sak 277a67d876 call touchalarm funcs as well as pin/timealarm. 2021-02-26 08:11:50 +09:00
jun2sak 2aa5aec0d5 cleanup. 2021-02-26 01:45:12 +09:00
jun2sak 9661d67cd3 replace MY_DEBUG_UART -> NRF_DEBUG_PRINT. 2021-02-25 01:49:57 +09:00
jun2sak 0f188befb6 set RAM retention just before deep sleep 2021-02-24 00:12:25 +09:00
jun2sak ec64fa6a29 move dump_xxx functions to debug_uart.c. 2021-02-23 12:16:37 +09:00
jun2sak 36c59250dd some cleanups. 2021-02-21 09:57:14 +09:00
jun2sak 41d9d4e0ab call sd API only when sd enabled. 2021-02-21 08:17:57 +09:00
jun2sak 26f8f532f1 safe mode fix. 2021-02-21 00:47:07 +09:00
jun2sak cf2427c561 light sleep reason fix. 2021-02-17 21:51:28 +09:00
jun2sak e6350ff834 Initial commit. 2021-02-17 20:53:18 +09:00