Commit Graph

24189 Commits

Author SHA1 Message Date
Jeff Epler 7782bc2e2e Skeleton implementation, does nothing 2021-06-10 11:15:18 -05:00
Jeff Epler 98f812e0c2 esp32s2: cam.c: Remove GPIO interrupt at deinit 2021-06-10 11:15:18 -05:00
Jeff Epler 929d6dab73 esp32s2: cam.c: work around possible compiler bug 2021-06-10 11:15:18 -05:00
Jeff Epler 8c88ab8142 cam: Use a named constant instead of a number 2021-06-10 11:15:18 -05:00
Jeff Epler 400d1d90c9 cam: Add a way to check if a frame is ready without blocking 2021-06-10 11:15:18 -05:00
Jeff Epler 5d5098152a cam: Remove support for xclk
we do this our own way in CP
2021-06-10 11:15:18 -05:00
Jeff Epler 20098dfdd8 cam: Improve memory allocation
* realloc the dma descriptors and buffers, so we can change the image size
 * NULL out the camera pointer after deinit, so deinit is idempotent
2021-06-10 11:15:18 -05:00
Jeff Epler 43509495ea cam: Always work in total pixels, not width x height 2021-06-10 11:15:18 -05:00
Jeff Epler eaf2def340 esp32s2: fix build errors in cam.c 2021-06-10 11:15:18 -05:00
Jeff Epler dc6472bb5b esp32s2: Add "cam" files from esp-dev-kits@282a356
.. these files have been re-formatted by our code-formatting
scripts, so their content does NOT match upstream.
2021-06-10 11:15:18 -05:00
Jeff Epler a0ec95f092 kaluga 1.2: add camera_data_tuple 2021-06-10 11:15:18 -05:00
Jeff Epler 80f909001d esp32s2: Add support for `make monitor`
`idf.py monitor` connects to the debug UART and shows the messages.  In
contrast to a traditional terminal program, it also has the limited
ability to transform hex addresses into file & line number information,
especially for debug builds.

This requires the elf file be copied to a specific place.
2021-06-10 11:15:18 -05:00
Jeff Epler 3e83834621 esp32s2: Add claim_pin_number
In ParallelImageCapture we need to grab a group of pins by number
2021-06-10 11:15:10 -05:00
Jeff Epler 1d03ec12b5 supervisor: Fix assertion error in supervisor_move_memory
It was possible for _only_ a low allocation to be performed.
In this case, `high_head` is NULL, and the comparison
`MP_STATE_VM(first_embedded_allocation) < high_head` would fail.

Closes: #4871
2021-06-10 11:10:27 -05:00
Dan Halbert eef3ca54a5
Merge pull request #4878 from jepler/fix-stubs-setup.py
setup.py: Improve installation of stubs
2021-06-10 11:48:49 -04:00
Jeff Epler 8e5c389c95 setup.py: Improve installation of stubs
* Don't include a full path from the build system
 * Rename all packages to "foo-stubs"
 * Don't install stubs for standard packages like "os"

After this, I can `python setup.py install --user` to install the stubs
to my local environment, and successfully check code against the stubs,
such as
```
/$ mypy -c 'import busio; b: busio.I2C; b.readfrom_into(0x30, b"")'
<string>:1: error: Argument 2 to "readfrom_into" of "I2C" has incompatible type "bytes"; expected "Union[bytearray, memoryview, array[Any], ndarray, RGBMatrix]"
Found 1 error in 1 file (checked 1 source file)
```

The structure of a wheel built with `python setup.py bdist_wheel` looks
more like lxml-stubs, as well.
```
Archive:  dist/circuitpython_stubs-7.0.0a3.dev28+g124c7b785-py3-none-any.whl
  Length      Date    Time    Name
---------  ---------- -----   ----
    30705  2021-06-10 13:50   _bleio-stubs/__init__.pyi…
```

Finally, by eliminating `site.getsitepackages()`, this **may** fix
the doc building problem on readthedocs.
2021-06-10 09:27:33 -05:00
Dan Halbert b815164bdf Turn off keypad on a few small builds 2021-06-10 10:09:55 -04:00
Dan Halbert c6e2237ac7 fix non-longint builds 2021-06-10 09:05:19 -04:00
Damien George 61f91de361 stm32/sdram: Prevent array-bounds warnings with GCC 11.
Signed-off-by: Damien George <damien@micropython.org>
2021-06-10 22:48:54 +10:00
Damien George cf849d84b9 stm32/boards: Enable MICROPY_HW_SPIFLASH_ENABLE_CACHE on VCC_GND boards.
Because these boards use the SPI flash cache in their bdev.c configuration.

Signed-off-by: Damien George <damien@micropython.org>
2021-06-10 22:48:17 +10:00
Damien George 71e3538a32 stm32/usb: Add USB_VCP.irq method, to set a callback on USB data RX.
Usage:

    usb = pyb.USB_VCP()
    usb.irq(lambda u:print(u, u.read()), usb.IRQ_RX)

Signed-off-by: Damien George <damien@micropython.org>
2021-06-10 15:26:21 +10:00
Dan Halbert 01a8a95b2c fix signed/unsigned compilation problem 2021-06-10 01:14:16 -04:00
Dan Halbert d3d9e0a487 add debouncing 2021-06-10 00:07:23 -04:00
Dan Halbert bdb70669a1 fix bad merge 2021-06-09 23:47:49 -04:00
Dan Halbert 4deca98f59 Merge branch 'keypad-scanning' of https://github.com/dhalbert/circuitpython into keypad-scanning 2021-06-09 23:42:24 -04:00
Tsutomu IKEGAMI 0a7c839c13 Fix format (expand tab) 2021-06-10 12:11:12 +09:00
Tsutomu IKEGAMI 72c4a5a523 Fix coordinate conversion algorithm of partial refresh area in displayio.TileGrid 2021-06-10 11:47:51 +09:00
Scott Shawcroft fb7dc9bcd5
Merge pull request #4875 from benclifford/pulldown
Correct pull-down direction in parameter documentation for rp2pio
2021-06-09 18:21:55 -07:00
Ben Clifford 5c835adb10 Correct pull-down direction in parameter documentation for rp2pio 2021-06-09 20:39:56 +00:00
Jeff Epler 576003e989
Merge pull request #4873 from netroy/fix-4810
Update the sdkconfig for LILYGO TTGO T8 ESP32-S2
2021-06-09 14:44:42 -05:00
Jeff Epler 26a75f74ec
Merge pull request #4862 from DavePutz/issue_3383
Fix for issue #3383 - SAMD5x microcontroller.cpu.voltage
2021-06-09 14:42:27 -05:00
root bc34403d71 Removed all references to MICROCONTROLLER_VOLTAGE_DISABLE 2021-06-09 10:46:14 -05:00
Aditya 3e463ed89e fix #4810 2021-06-09 17:37:22 +02:00
Jeff Epler c6dee5288f
Merge pull request #4870 from jepler/kaluga-1.3
Add kaluga version 1.3
2021-06-09 08:37:51 -05: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
Dan Halbert abe29fc6d9 merge from upstream 2021-06-08 18:03:43 -04:00
Dan Halbert 44b876f769 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 17:47:21 -04:00
Jeff Epler 124c7b785a Add kaluga version 1.3
.. this board is nearly the same as the "1.2" version originally
released, but makes a few changes to reduce pin conflicts between the 13-pin
camera header and the bootstrapping pins.  "1.3" was introduced in summer
2020-- check the bottom of your board silk to find out whether you have a 1.2
or a 1.3, because it's not clear whether there is remaining 1.2 stock.

Another vexing fact about the 1.3 is that its LCD can have one of two
chipets, and the chipset used is not marked anywhere!
2021-06-08 13:28:48 -05:00
root 72db13fc2d enable microcontroller.cpu.voltage on SAME54 2021-06-08 10:04:40 -05:00
Zoltán Vörös 8c02b94946 nrf: Add more math sources to Makefile, and enable log2 implementation.
This commit adds a few math functions to the source list in the Makefile,
and implements the log2f function, so that ulab can be compiled on the nrf
boards.  It also addresses part of #5162.
2021-06-08 16:39:47 +10:00
Miguel Grinberg de2e081260 extmod/uasyncio: Fix start_server and wait_closed race condition.
This fix prevents server.wait_closed() from raising an AttributeError when
trying to access server.task.  This can happen if it is called immediately
after start_server().
2021-06-08 15:10:50 +10:00
Abilio Marques 525a920ca5 unix/modffi: Fix conversion between Python integers and ffi types.
This commit fixes the following problems converting to/from Python integers
and ffi types:
- integers of 8 and 16 bits not working on big endian
- integers of 64 bits not working on 32 bits architectures
- unsigned returns were converted to signed Python integers

Fixes issue #7269.
2021-06-08 13:06:17 +10:00
Limor "Ladyada" Fried c1c101ca2d
Merge pull request #4864 from ladyada/main
macropad rev B definion and fix for SH110x addressing
2021-06-07 21:59:56 -04:00
lady ada 467a4e7664 fix comment 2021-06-07 19:51:57 -04:00
lady ada b39dd84560 move the col/row offsets to the top so oleds can take advantage of em 2021-06-07 19:43:49 -04:00
Scott Shawcroft 12499d6e26
Merge pull request #4860 from microDev1/update-readme
Update readme
2021-06-07 15:08:23 -07:00
Lucian Copeland b6a268fca4 Further deinit additions 2021-06-07 14:13:59 -04:00
Lucian Copeland 63c1791d87 Merge remote-tracking branch 'upstream/main' into rp2040-alarms 2021-06-07 14:11:41 -04:00
Lucian Copeland f2149edbd2 Add deinit to new boards 2021-06-07 12:48:12 -04:00
lady ada 2ff9e9766f handclang 2021-06-07 12:39:59 -04:00