Commit Graph

170 Commits

Author SHA1 Message Date
Dan Halbert
3d18c5c327 Use a single list of keypad scanners 2021-06-16 13:29:38 -04:00
Dan Halbert
32eec85230 compiles 2021-06-14 20:54:43 -04:00
Dan Halbert
7d23206018 Inital keypad work: Keys working: one pin per key
keypad.Buttons and keypad.State

Buttons -> Keys; further work

wip

wip

wip: compiles

about to try

keypad.Keys working
2021-06-08 20:27:31 -04:00
George Waters
c5066efacb
Enable slice indices 2021-06-03 22:55:32 -04:00
Scott Shawcroft
499a4388cf
Handle inverted neopixel power 2021-05-19 17:29:02 -07:00
Scott Shawcroft
e02a26453c
Merge MicroPython 1.14 into CircuitPython 2021-05-11 15:07:40 -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
17fcd499b2
Merge pull request #4649 from tannewt/merge_1.11_2
Merge MicroPython v1.11 into CircuitPython
2021-04-27 11:02:02 -07:00
Scott Shawcroft
76033d5115
Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
Jeff Epler
fc4538f845 WIP: Implement 'ParallelImageCapture' for samd51 2021-04-16 17:18:59 -05:00
Artyom Skrobov
8056af8648 [synthio] add a simple MidiTrack implementation 2021-03-26 16:38:10 -04:00
microDev
a52eb88031
run code formatting script 2021-03-15 19:27:36 +05:30
Jeff Epler
1e5ffe1a53 Revert "circuitpy_mpconfig: Disable flash multi-partition"
This reverts commit 156ee4833a.
2021-03-09 11:08:36 -06:00
Scott Shawcroft
b5a955a168
Merge pull request #4354 from jepler/disable-fat-partition
circuitpy_mpconfig: Disable flash multi-partition
2021-03-08 15:25:58 -08:00
Jeff Epler
156ee4833a circuitpy_mpconfig: Disable flash multi-partition
This adds some additional code in mkfs which doesn't seem necessary, and
Disabling it saves 172 bytes flash.

Testing performed: Using a Feather M0 Adalogger, checked that
 * an sdcard could still be mounted (using adafruit_sdcard)
 * os.listdir() of "/" and "/sd" worked
 * CIRCUITPY still mounted
2021-03-07 09:37:18 -06:00
Jeff Epler
4f040af481 vm: Make the speed-size trade-off compile time settable
.. and enable for all samd21 boards
2021-03-05 18:29:27 -06:00
Kevin Matocha
b720028642 Add bitmaptools module 2021-02-23 23:23:14 -06:00
Dan Halbert
67406488d1 merge from upstream; re-alphabetize 2021-02-19 14:22:50 -05:00
Jeff Epler
7fd4567893 bitops: rename from _bit_transpose, describe the algorithm 2021-02-18 15:41:23 -06:00
Jeff Epler
9cf7d73c6c core: add bit_transpose function
.. this version can only handle exactly 8 bits "across".  The restriction
may be relaxed in a future revision.
2021-02-18 11:32:47 -06:00
Dan Halbert
d54b5861a3 wip 2021-02-12 19:01:14 -05:00
Dan Halbert
da6869dbd5 Set MICROPY_PY_UERRNO_ERRORCODE correctly 2021-01-26 08:37:05 -05:00
Dan Halbert
a9f339b461 typo in circuitpy_mpconfig.h; forgot cxd56 port 2021-01-25 22:40:31 -05:00
Dan Halbert
69869e1439 CIRCUITPY_* switches for JSON, RE, etc. Doc cleanup 2021-01-24 23:10:20 -05:00
Scott Shawcroft
b7a63dc498
Alphabetical 2021-01-21 10:18:04 -08:00
Scott Shawcroft
733094aead
Add initial RP2040 support
The RP2040 is new microcontroller from Raspberry Pi that features
two Cortex M0s and eight PIO state machines that are good for
crunching lots of data. It has 264k RAM and a built in UF2
bootloader too.

Datasheet: https://pico.raspberrypi.org/files/rp2040_datasheet.pdf
2021-01-20 19:16:56 -08:00
iot49
1a82555803
Merge branch 'main' into msgpack 2021-01-05 11:19:11 -08:00
microDev
4863413bc9
rename ota to dualbank 2020-12-18 00:34:56 +05:30
microDev
37ee5e683d
Merge branch 'main' into ota-s2 2020-12-12 05:25:46 +05:30
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
microDev
fc23a0cc8a
implement ota module 2020-12-08 11:30:00 +05:30
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
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
Mark
237385798c
Merge branch 'main' into bus_device 2020-12-01 15:47:16 -06:00
Scott Shawcroft
a975ef4971
Merge pull request #3695 from cwalther/movable
Add movable supervisor allocations
2020-11-30 16:00:55 -08:00
Dan Halbert
9768951a2a Disable complex arithmetic on SAMD21 builds to make space 2020-11-29 15:34:38 -05:00
Christian Walther
2ba9805f84 Use movable allocation system for terminal tilegrid.
Moving memory is now done by the infrastructure and neither necessary nor correct here anymore.
2020-11-28 17:54:34 +01: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
28d9e9186e Disable complex arithmetic on SAMD21 builds to make space 2020-11-28 10:12:46 -05:00
Dan Halbert
ef0830bfe2 merge from upstream + wip 2020-11-25 17:52:06 -05:00
Jeff Epler
c451b22255 Disable 3-arg pow() function on m0 boards
`pow(a, b, c)` can compute `(a ** b) % c` efficiently (in time and memory).
This can be useful for extremely specific applications, like implementing
the RSA cryptosystem.  For typical uses of CircuitPython, this is not an
important feature.  A survey of the bundle and learn system didn't find
any uses.

Disable it on M0 builds so that we can fit in needed upgrades to the USB
stack.
2020-11-24 16:54:33 -06:00
Dan Halbert
682054a216 WIP: redo API; not compiled yet 2020-11-19 00:23:27 -05:00
Dan Halbert
ffff02c053 Merge remote-tracking branch 'adafruit/main' into sleep 2020-11-16 12:06:11 -05:00
Dan Halbert
bb77f1d130 wip: initial code changes, starting from @tannewt's sleepio branch 2020-11-16 11:56:20 -05:00
Scott Shawcroft
bda3267432
Save flash space
* No weak link for modules. It only impacts _os and _time and is
  already disabled for non-full builds.
* Turn off PA00 and PA01 because they are the crystal on the Metro
  M0 Express.
* Change ejected default to false to move it to BSS. It is set on
  USB connection anyway.
* Set sinc_filter to const. Doesn't help flash but keeps it out of
  RAM.
2020-11-13 18:57:52 -08:00