Commit Graph

53 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
microDev
b33a2b45dc
add coproc alarm 2022-10-20 18:38:20 +05:30
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
Dan Halbert
a01dec1df9 message consolidation and more use of validators 2022-05-19 15:38:37 -04:00
Jeff Epler
9e799a7c74
-Werror=missing-prototypes for nRF 2021-11-10 11:26:54 -06:00
microDev
513ca098f9
Merge pull request #5273 from tannewt/fix_nrf_light_sleep_cdc
Fix nrf light_sleep when on usb
2021-08-31 13:29:04 +05:30
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
a8dd881ee5
Fix GPIOTE crashes by checking everything is ok
Fixes #5240 and fixes #5211
2021-08-27 16:07:29 -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
bce541dcc5 Minor text fixes 2021-05-18 15:16:25 -04:00
Lucian Copeland
715f7ee490 Add STM32 and NRF52 compatibility 2021-05-14 14:34:35 -04:00
Lucian Copeland
0d3c5222d8 Merge remote-tracking branch 'upstream/main' into stm-alarm 2021-05-10 17:30:33 -04:00
Jeff Epler
dfa7c3d32d codeformat: Fix handling of **
After discussing with danh, I noticed that `a/**/b` would not match `a/b`.

After correcting this and re-running "pre-commit run --all", additional
files were reindented, including the codeformat script itself.
2021-04-30 15:30:13 -05: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
bab5a22f0c Fix build issues
H7 compatibility problems in port.c and peripherals/exti
NRF build failures due to new use of const for PinAlarm pin objects
Isolated board flash overage on blackpill_with_flash, remove audio modules
2021-04-29 14:48:16 -04:00
Lucian Copeland
9fe8d61656 Fix broken MP macros from 1.11 merge 2021-04-28 18:26:52 -04:00
Lucian Copeland
5c4500dbfa Fix MP type macros 2021-04-28 15:35:15 -04: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
7cecd99658 remove unused debug printf's. 2021-02-28 16:04:29 +09:00
jun2sak
3e47e00291 address the pretending-to-deep-sleep issue. 2021-02-28 15:57:37 +09:00
jun2sak
498debc826 remove unused debug printf's. 2021-02-28 15:37:25 +09:00
jun2sak
0f8c96f424 remove trailing whitespaces. 2021-02-26 09:11:35 +09:00
jun2sak
7fd4648cd5 rase error if Alarm time >= 512 sec. 2021-02-26 09:06:11 +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
c86ca2a4ff move externs to .h 2021-02-26 00:51:52 +09:00
jun2sak
9328d09a7a re-enable parameters check. 2021-02-26 00:50:44 +09:00
jun2sak
61a69daae1 raise NotImplementedError when construct TouchAlarm. 2021-02-25 08:19:03 +09:00
jun2sak
f66896ce32 use nRF SDK function to set up memory retention. 2021-02-25 02:34:43 +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
9df0f439f3 alarm/pin/__init__.c is no longer used. 2021-02-23 10:31:49 +09:00
jun2sak
36c59250dd some cleanups. 2021-02-21 09:57:14 +09:00
jun2sak
793198909e set SleepMemory size to 256 bytes. 2021-02-21 08:19:39 +09:00
jun2sak
41d9d4e0ab call sd API only when sd enabled. 2021-02-21 08:17:57 +09:00