Commit Graph

143 Commits

Author SHA1 Message Date
Dan Halbert e9369d50e1
Merge pull request #5067 from tannewt/pulseout_switch
Switch to pin, frequency and duty_cycle PulseOut
2021-07-28 14:58:06 -04:00
Kattni fc59a7ac02
Merge pull request #5068 from dhalbert/remove-gamepad
remove gamepad; deprecate gamepadshift
2021-07-27 11:35:06 -04:00
Kamil Tomaszewski ff65863719 spresense: update SDK to 2.2.0 2021-07-27 11:25:51 +02:00
Dan Halbert 901a6c27c0 remove gamepad; deprecate gamepadshift 2021-07-26 22:15:09 -04:00
Scott Shawcroft 412eb87080
Switch to pin, frequency and duty_cycle PulseOut
Passing in a PWMOut still works but is deprecated. It will be
removed in CircuitPython 8.0.0

This also switches STM32 timer indices and channel indices to
0-based in our pin data rather than `- 1` everywhere. The latter is
more bug prone.

Most of the way for #3264

Tested on Metro M0, Metro M4, Feather S2, Feather nRF52840, Feather
STM32F4 and Arduino RP2040.
2021-07-26 18:35:49 -07:00
Kamil Tomaszewski da248d1594 spresense: Fix USB CDC and MSC 2021-05-18 17:02:16 +02:00
Dan Halbert fa6c06fb38 count in/out endpoints; allow more usb modules on low-endpoint boards 2021-05-13 21:59:02 -04:00
Scott Shawcroft 42f4065c8a
Merge remote-tracking branch 'adafruit/main' into merge_1.13 2021-05-06 11:17:53 -07:00
Dan Halbert 579cdf30f1 fix more build errors 2021-05-05 16:49:29 -04:00
Scott Shawcroft f0bb26d70f
Merge MicroPython 1.13 into CircuitPython 2021-05-04 18:06:33 -07:00
Dan Halbert f06d54524d merge from adafruit 2021-04-28 23:48:26 -04:00
Dan Halbert f98a54628b wip: compiles 2021-04-27 14:37:36 -04:00
Scott Shawcroft 76033d5115
Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
Dan Halbert 64e0958916 wip: descriptor building 2021-04-21 23:25:36 -04:00
Jeff Epler bc690d4070
Merge pull request #4415 from jepler/pre-commit-no-run-if-empty
pre-commit: code formatter fixes
2021-03-16 09:54:12 -05:00
Scott Shawcroft 9cb8ce67ed
Merge pull request #4412 from kamtom480/spi_and_i2c
spresense: minor changes for i2c, spi and uart
2021-03-15 17:35:06 -07:00
Jeff Epler d3bf1fe15d modifications by pre-commit 2021-03-15 18:11:00 -05:00
Kamil Tomaszewski ed3f636be5 spresense: empty rx uart fifo after initialization 2021-03-15 16:14:16 +01:00
Kamil Tomaszewski 22ed0abf6c spresens: configure pin mode for i2c and spi 2021-03-15 16:14:16 +01:00
microDev a52eb88031
run code formatting script 2021-03-15 19:27:36 +05:30
Kamil Tomaszewski 18668f6e28 spresense: fix spi to work with only one data pin 2021-03-11 18:06:49 +01:00
Kamil Tomaszewski 76d0870fba spresense: return error as positive value for i2c 2021-03-11 18:04:01 +01:00
Kamil Tomaszewski 7c921b808b spresense: Define LONGINT_IMPL as MPZ 2021-03-02 14:25:22 +01:00
Kamil Tomaszewski f9d21637a3 spresense: return valid reference voltage 2021-03-02 14:25:22 +01:00
Scott Shawcroft d0eab5c561
Merge pull request #4256 from kmatch98/bt_cleanup
Add `bitmaptools` module
2021-03-01 18:24:12 -08:00
Kamil Tomaszewski d68fdf3a3d spresense: return the correct value for Analog In 2021-03-01 15:45:10 +01:00
Kevin Matocha a7a4f93ff8 Updated build configs to turn off BITMAPTOOLS for smaller builds 2021-02-25 15:44:32 -06:00
Kamil Tomaszewski e369473794 spresense: change RX and TX buffer size for CDC 2021-02-24 18:19:18 +01:00
Dan Halbert e344c6d684 fix some builds 2021-02-18 14:24:58 -05:00
Dan Halbert c26de0136a works! no timeouts 2021-02-16 17:39:36 -05:00
Dan Halbert f0564b4986 merge from upstream; complicated webusb merge 2021-02-11 18:50:02 -05:00
Kamil Tomaszewski c5992a3101 spresense: update Spresense SDK to 2.0.2 2021-01-25 18:40:14 +01:00
iot49 1a82555803
Merge branch 'main' into msgpack 2021-01-05 11:19:11 -08: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
Scott Shawcroft 344d3c59cb
Merge branch 'main' into msgpack 2020-12-11 11:10:30 -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 608c98501b
Merge remote-tracking branch 'adafruit/main' into msgpack 2020-12-02 13:10:39 -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 546b15bf1a
add trailing newline 2020-12-01 18:42:07 -08:00
Bernhard Boser 87d4184dd5
exclude spresense 2020-12-01 18:42:06 -08:00
Bernhard Boser 582a47d71a
rename read, write to read_bytes, write_bytes 2020-12-01 18:41:11 -08:00
Bernhard Boser 59c3e25168
disable on boards tight on memory. add stddef.h to imports (not actually needed). 2020-12-01 18:39:24 -08: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 cd436bad1a Merge remote-tracking branch 'adafruit/main' into sleep 2020-11-19 15:43:49 -05:00
Kamil Tomaszewski 76d4824728 spresense: Return fixed stack 2020-11-19 15:04:52 +01:00