Commit Graph

1222 Commits

Author SHA1 Message Date
jun2sak
2eed9a1735 old System OFF sleep code for future reference. 2021-03-07 20:21:33 +09:00
jun2sak
7430b92d27 address hw pin-reset while sleep. 2021-03-07 20:20:29 +09:00
jun2sak
2795c002ad disable QSPI while system ON idle loop. 2021-03-07 19:14:04 +09:00
jun2sak
cd5c0e99f7 Clean up. 2021-03-07 19:09:01 +09:00
nitz
3b76299f39
Add new nRF port for SF MicroMod nRF52840. 2021-03-07 01:06:50 -05:00
jun2sak
3fab9f8b1b new wait-until-alarm design, don't use System OFF. 2021-03-07 01:09:54 +09:00
Artyom Skrobov
e0b96c0f43 [nrf] No need to store buffer_length as part of audiopwmio_pwmaudioout_obj_t 2021-03-05 06:01:58 -05:00
Jeff Epler
efc2667b5f
Merge pull request #4186 from jepler/update-protomatter-rp2
Enable protomatter on RP2040 builds
2021-03-02 19:01:37 -06:00
Scott Shawcroft
d0eab5c561
Merge pull request #4256 from kmatch98/bt_cleanup
Add `bitmaptools` module
2021-03-01 18:24:12 -08:00
Jeff Epler
238484ec26 Merge remote-tracking branch 'origin/main' into update-protomatter-rp2 2021-03-01 15:18:32 -06: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
9b34726c0d GPIO and GPIOTE reg dump for debug. 2021-02-28 15:36:14 +09:00
Jeff Epler
1d1ff5f308 Merge remote-tracking branch 'origin/main' into update-protomatter-rp2 2021-02-26 09:56:35 -06:00
Scott Shawcroft
3f08cb47b8
Merge remote-tracking branch 'adafruit/main' into busio-uart-rp 2021-02-25 16:59:15 -08: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
Kevin Matocha
a7a4f93ff8 Updated build configs to turn off BITMAPTOOLS for smaller builds 2021-02-25 15:44:32 -06:00
jun2sak
2aa5aec0d5 cleanup. 2021-02-26 01:45:12 +09:00
jun2sak
c713d31d0d move externs to .h 2021-02-26 01:20:55 +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
microDev
5d7fdafcde
implement suggested changes
- add internal buffering
- rtc initialization fix
2021-02-25 00:48:36 +05:30
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
72b5f1a9a6 clean up my personal settings. 2021-02-25 01:38:23 +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
372c98626a move all the debug codes from port.c to debug_uart.c. 2021-02-23 11:56:40 +09:00
jun2sak
9df0f439f3 alarm/pin/__init__.c is no longer used. 2021-02-23 10:31:49 +09:00
jun2sak
5c858a1925 add weak board_deinit(). 2021-02-21 16:27:21 +09:00
jun2sak
1da8b9900a Merge branch 'main' into nrf52-sleep 2021-02-21 13:35:06 +09:00
jun2sak
36c59250dd some cleanups. 2021-02-21 09:57:14 +09:00
jun2sak
d659c2ce34 move port-specific debug functions from supervisor/shared/serial.c to ports/nrf/supervisor/port.c 2021-02-21 09:55:10 +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
Dan Halbert
cf3217e6d4
Merge pull request #4232 from TG-Techie/fix_tg_watch
fix TG-Watch ble issue
2021-02-20 18:10:52 -05:00
Jonah Yolles-Murphy
a9a2145238 fix TG-Watch ble issue 2021-02-20 15:46:33 -05:00
jun2sak
26f8f532f1 safe mode fix. 2021-02-21 00:47:07 +09:00
Dan Halbert
985e020936 shrink simmel build 2021-02-19 18:41:27 -05:00
Dan Halbert
e344c6d684 fix some builds 2021-02-18 14:24:58 -05:00
Dan Halbert
5c37b73c6d fix typo to fix nrf builds 2021-02-18 11:09:32 -05: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
Dan Halbert
d54b5861a3 wip 2021-02-12 19:01:14 -05:00
Jeff Epler
ff1942cff6 Enable protomatter on RP2040 builds
Also found a race condition between timer_disable and redraw, which
would happen if I debugger-paused inside common_hal_rgbmatrix_timer_disable
or put a delay or print inside it.  That's what pausing inside reconstruct
fixes.

So that the "right timer" can be chosen, `timer_allocate` now gets the `self`
pointer.  It's guaranteed at this point that the pin information is accurate,
so you can e.g., find a PWM unit related to the pins themselves.
This required touching each port to add the parameter even though it's
unused everywhere but raspberrypi.
2021-02-12 08:25:15 -06:00
Dan Halbert
f0564b4986 merge from upstream; complicated webusb merge 2021-02-11 18:50:02 -05:00
Dan Halbert
1b7f3d11e7 wip 2021-02-08 10:57:41 -05:00
Dan Halbert
0802b22ed6 usb descriptors all set; rework of enabling for USB devices 2021-02-04 19:23:40 -05:00
BiffoBear
2656c84b01 Initial commit. Edited error messages in .c files 2021-02-03 05:49:40 +07:00
Dan Halbert
745ba01768 shrink simmel 2021-02-01 12:22:35 -05:00
Bernhard Boser
e285b5b98c Merge remote-tracking branch 'adafruit/main' into cp-flow 2021-01-27 09:22:41 -08:00
Bernhard Boser
16d54586c1 remove long read error message 2021-01-27 09:20:45 -08:00
Dan Halbert
13812a788f
Merge pull request #4060 from dhalbert/regularize-extmod-modules
CIRCUITPY_* switches for JSON, RE, etc. Doc cleanup
2021-01-26 12:54:21 -05:00
Dan Halbert
f154ee855d shrink simmel 2021-01-26 10:23:37 -05:00
Dan Halbert
69869e1439 CIRCUITPY_* switches for JSON, RE, etc. Doc cleanup 2021-01-24 23:10:20 -05:00
Bernhard Boser
e27dd26dc7 make translate, BEWARE adds the 'world' 2021-01-18 11:26:39 -08:00
Bernhard Boser
07a9593abc add flow control info to busio_uart_obj_t 2021-01-17 19:33:32 -08:00
gamblor21
41b9196167 Disabling in more small boards 2021-01-17 00:00:06 -06:00
Dan Halbert
c4f0325ff8
Merge pull request #3991 from TG-Techie/main
Revision to TG-Watch
2021-01-14 18:43:52 -05:00
Jonah Yolles-Murphy
c63d5a44a0 restore TG-Watch USB_PID from accidental overwrite 2021-01-14 00:08:34 -05:00
Jonah Yolles-Murphy
5f8ad0c5e6 correct USB_PRODUCT for TG-Watch 2021-01-14 00:02:56 -05:00
Jonah Yolles-Murphy
8f8af90098 final name and extra board 2021-01-13 23:51:34 -05:00
Dan Halbert
ccace62ac9 don't check length for remote characteristic or dedescriptor 2021-01-13 15:35:51 -05:00
Scott Shawcroft
4db55652a3
Merge pull request #3964 from dhalbert/ble-timing-fixes
Round BLE timing values; fix timeout check
2021-01-11 16:52:14 -08:00
Scott Shawcroft
91245297e8
Merge pull request #3659 from iot49/msgpack
module msgpack
2021-01-11 15:22:39 -08:00
Dan Halbert
a397af9bdf Round BLE timing values; fix timeout check 2021-01-10 13:16:19 -05:00
Jonah Yolles-Murphy
8652d69614 update TG-Watch pins, name, and frozen libraries 2021-01-10 04:04:50 -05:00
foamyguy
13efbf24e5 disable msgpack on boards without room 2021-01-09 10:33:56 -06:00
Bernhard Boser
c7dc5f2507 support RTS/CTS hardware flow control 2021-01-07 14:13:19 -08:00
Dan Halbert
9a1d864331 overflowed tick counter needs 64 bits everywhere 2021-01-06 11:09:06 -05:00
iot49
1a82555803
Merge branch 'main' into msgpack 2021-01-05 11:19:11 -08:00
microDev
dc332baa87
update common_hal_reset_pin() 2020-12-28 20:04:00 +05:30
Dan Halbert
a11ad25727 BLE fixes 2020-12-23 16:39:27 -05:00
Scott Shawcroft
fb0c74c5f1
Merge pull request #3662 from ElectronicCats/bastble
Add new board BastBLE
2020-12-21 17:39:08 -08:00
sabas1080
d24a5d6270 update path board.h 2020-12-20 15:52:19 -06:00
sabas1080
bd3c5c33fb define QSPI pinout 2020-12-20 14:57:10 -06:00
sabas1080
88b1e2fe61 remove Internal flash unnecessary 2020-12-20 13:35:15 -06:00
Dan Halbert
8f9cd7075e
Merge pull request #3752 from jepler/gcc10
build: Update to gcc10
2020-12-17 11:03:40 -05:00
Dan Halbert
fb33c4e1c0 -ftree-vrp better diagnostics on -Os builds; -fno-inline-functions for -O2; fix struct init in HCI bleio 2020-12-15 12:23:56 -05:00
Jeff Epler
bbbd621b18 nrf: simmel: remove some unneeded modules to make it fit 2020-12-15 10:54:37 -06:00
Scott Shawcroft
344d3c59cb
Merge branch 'main' into msgpack 2020-12-11 11:10:30 -08:00
Scott Shawcroft
0b4bcd9599
Fix build and more comments 2020-12-08 13:05:21 -08:00
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
Scott Shawcroft
1130b80e2a
Merge pull request #3612 from gamblor21/bus_device
Moving Adafruit_CircuitPython_BusDevice to core
2020-12-02 13:23:02 -08:00
Scott Shawcroft
608c98501b
Merge remote-tracking branch 'adafruit/main' into msgpack 2020-12-02 13:10:39 -08:00
Bernhard Boser
34bbcc4910
exclude nrf/simmel due to lack of flash 2020-12-02 13:05:00 -08:00
Scott Shawcroft
d7ba641ff6
Merge pull request #3767 from dhalbert/sleep
Initial alarm and sleep PR: time alarms with light and deep sleep; PinAlarms not yet implemented
2020-12-02 12:51:43 -08:00
Bernhard Boser
513253bc3f
moved logic to shared-module and added documentation 2020-12-01 18:38:14 -08:00
Bernhard Boser
90c203a3dd
add module msgpack 2020-12-01 18:38:14 -08:00
gamblor21
fe1c2fa6f0 Removed bus device from simmel build 2020-12-01 19:11:17 -06:00
Dan Halbert
8b7c23c1ee address review comments 2020-12-01 20:01:14 -05:00
Christian Walther
c7404a3ff8 Add movable allocation system.
This allows calls to `allocate_memory()` while the VM is running, it will then allocate from the GC heap (unless there is a suitable hole among the supervisor allocations), and when the VM exits and the GC heap is freed, the allocation will be moved to the bottom of the former GC heap and transformed into a proper supervisor allocation. Existing movable allocations will also be moved to defragment the supervisor heap and ensure that the next VM run gets as much memory as possible for the GC heap.

By itself this breaks terminalio because it violates the assumption that supervisor_display_move_memory() still has access to an undisturbed heap to copy the tilegrid from. It will work in many cases, but if you're unlucky you will get garbled terminal contents after exiting from the vm run that created the display. This will be fixed in the following commit, which is separate to simplify review.
2020-11-28 17:50:23 +01:00
Dan Halbert
104a089677 deep sleep working; deep sleep delay when connected 2020-11-26 22:06:37 -05:00
Dan Halbert
a0f1ec3c4a wip 2020-11-22 19:10:09 -05:00
Dan Halbert
75559f35cc wip: ResetReason to microcontroller.cpu 2020-11-21 23:29:52 -05:00
Dan Halbert
5bb3c321e9 merge from main 2020-11-19 00:29:14 -05:00