Commit Graph

1729 Commits

Author SHA1 Message Date
anecdata
2e52c0ae62 set all wifi modes; add sta start & sta/ap stop 2021-04-24 16:41:41 -05:00
Dan Halbert
2ba2574ebf
Merge pull request #4619 from tyomitch/microbit
[build] Allow USB to be set to 0
2021-04-24 10:31:29 -04:00
anecdata
4d267ef644 add get_ipv4_address_ap 2021-04-23 21:44:34 -05:00
Dan Halbert
556a126917 wip: getting closer 2021-04-23 21:44:13 -04:00
Scott Shawcroft
80e8b4ac14
Merge pull request #4635 from jepler/pcc
WIP: Implement 'ParallelImageCapture' for samd51
2021-04-23 13:31:53 -07:00
Jeff Epler
8565a9ab90 shared-bindings: Fix type of Colorspace values in docs 2021-04-23 12:39:37 -05:00
Artyom Skrobov
4e3c1d4a4c [build] Allow USB to be set to 0
Unify USB-related makefile var and C def as CIRCUITPY_USB.

Always define it as 0 or 1, same as all other settings.

USB_AVAILABLE was conditionally defined in supervisor.mk,
but never actually used to #ifdef USB-related code.

Loosely related to #4546
2021-04-23 11:13:34 -04:00
Jeff Epler
05a81a066e displayio: Improve docs about Colorspaces 2021-04-23 09:57:24 -05:00
James Carr
0be610fd2b
Changes as requested for Bitmap docs. 2021-04-23 14:41:47 +01:00
James Carr
07059dd373
Minor docs fixes in displayio.Bitmap 2021-04-23 12:56:44 +01:00
anecdata
9da8978d40 more of the same 2021-04-22 23:41:57 -05:00
anecdata
632cebafc6 fix comment (stub fail) 2021-04-22 23:33:33 -05:00
Dan Halbert
2b4c88d633 wip: partial HID, still needs rework 2021-04-23 00:18:05 -04:00
anecdata
3544d4e221 .start_ap() & .mac_address_ap 2021-04-22 22:57:07 -05:00
Dan Halbert
01979acd48
Merge pull request #4604 from tannewt/buffer_size
Assume max characteristic size when the client
2021-04-20 12:02:06 -04:00
Jeff Epler
99799cded6 imagecapture: implement to review suggestions 2021-04-20 10:21:32 -05:00
Jeff Epler
76d68f21ac displayio: Add RGB555/565/_SWAPPED format support
This is helpful when displaying frames from an OV7670 camera, which
uses the RGB565_SWAPPED format internally.
2021-04-19 10:23:47 -05:00
Jeff Epler
fc4538f845 WIP: Implement 'ParallelImageCapture' for samd51 2021-04-16 17:18:59 -05:00
Scott Shawcroft
81e11ae063
Fix type 2021-04-16 11:30:10 -07:00
Lucian Copeland
e0024c70de Merge remote-tracking branch 'upstream/main' into stm-alarm 2021-04-15 16:32:30 -04:00
Lucian Copeland
7eeea869ac Fix light sleep global alarms, API revisions 2021-04-15 15:02:42 -04:00
Neradoc
827f67813f add a filter text field to the support matrix 2021-04-15 19:05:50 +02:00
Dan Halbert
6cb751ab06 wip: revamp API names 2021-04-14 22:10:09 -04:00
Scott Shawcroft
aa28d4f315
Allow setting max_packet_size for PacketBuffer
This is handy for remote characteristics because it allows for
the PacketBuffer binding code to have the correct max size. This
PR also adds checks so we don't write outside the outgoing buffer.
2021-04-14 17:09:48 -07:00
Dan Halbert
4a7e129287 wip: latent usb device enabling/disabling 2021-04-13 23:33:44 -04:00
Artyom Skrobov
c6ee471b52 Merge branch 'main' of https://github.com/adafruit/circuitpython into patch-3 2021-04-13 00:32:19 -04:00
Lucian Copeland
15764b4c24 Merge remote-tracking branch 'upstream/main' into nrf52-sleep 2021-04-09 13:48:45 -04:00
Dan Halbert
72055ff02b
Merge pull request #4578 from tannewt/packetbuffer_lengths
Improve PacketBuffer lengths and remove packet_size
2021-04-08 18:55:24 -04:00
Scott Shawcroft
5ec195b5ef
Remove PacketBuffer.packet_size
Fixes #2853
2021-04-08 13:29:26 -07:00
Dan Halbert
82479b6a2c
Merge pull request #4503 from hierophect/sleep-api-update
Sleep API changes and fix for main.c silent issue
2021-04-06 16:53:25 -04:00
James Carr
8958c1e227 Minor documentation fixes in displayio 2021-04-06 10:47:46 +01:00
Lucian Copeland
bf58afdb2a
Merge pull request #4399 from tyomitch/patch-2
[stm] implementation of audiopwmio
2021-04-05 18:35:39 -04:00
Jeff Epler
78089107bc displayio.Bitmap: Allow modification though the buffer protocol
It is required to call .dirty() with appropriate arguments after modifications through the buffer protocol, or the display might not be updated correctly.
2021-04-03 10:41:20 -05:00
Jeff Epler
3f158450f9 can't xref this right now 2021-04-02 13:09:23 -05:00
Jeff Epler
5a56df989f can't xref this right now 2021-04-02 13:09:23 -05:00
Jeff Epler
758dc81fcb displayio: ulab.frombuffer -> ulab.numpy.frombuffer 2021-04-02 13:09:23 -05:00
Jeff Epler
b1dfd64fdc stubs: ulab.array -> ulab.ndarray 2021-04-02 13:09:23 -05:00
Lucian Copeland
17585e1e07 Clean up API 2021-04-02 14:08:48 -04:00
James Carr
65759622ea Add a missing parameter to an error message (Fixes #4505) 2021-03-29 23:03:14 +01:00
Dan Halbert
b274a0497b
Merge pull request #4501 from jepler/rgbmatrix-memoryview
RGBMatrix: fix memoryview(matrix)
2021-03-29 16:07:22 -04:00
Lucian Copeland
d35a307ffa Merge branch 'sleep-api-update' into stm-alarm 2021-03-29 12:27:25 -04:00
Lucian Copeland
00178ca5e0 Sleep API changes, redundancy fix 2021-03-27 14:14:57 -04:00
Lucian Copeland
529fb52309 Style changes and wakeup detection 2021-03-27 13:16:12 -04:00
Jeff Epler
b04f9130c7 RGBMatrix: fix memoryview(matrix)
Typical test:
```python
import displayio
import rgbmatrix
import board
displayio.release_displays()
matrix = rgbmatrix.RGBMatrix(
    width=128, bit_depth=4,
    rgb_pins=[board.GP0, board.GP1, board.GP2, board.GP3, board.GP4, board.GP5],
    addr_pins=[board.GP6, board.GP7, board.GP8, board.GP9],
    clock_pin=board.GP10, latch_pin=board.GP11, output_enable_pin=board.GP12)
mem = memoryview(matrix)
mem[0] = 65535 #  OK
mem[0] = 65536 #  errors (out of range)
```
2021-03-27 12:04:27 -05:00
Jeff Epler
583fc76cf5 run uncrustify 2021-03-26 15:38:20 -05:00
Artyom Skrobov
8056af8648 [synthio] add a simple MidiTrack implementation 2021-03-26 16:38:10 -04:00
Jeff Epler
a70b679ed5 bitbangio.SPI.read: Support write_value, fix some other nits 2021-03-26 12:24:09 -05:00
Artyom Skrobov
b40d072648 [stm] implementation of audiopwmio
Based on nrf PWMAudioOut by @jepler and stm PulseOut by @hierophect

Tested on a Meowbit
2021-03-26 13:18:01 -04:00
Dan Halbert
1512ca520b Fix PWMOut non-error handling and never reset 2021-03-19 09:57:21 -04:00
Dan Halbert
b2d913412f merge from upstream 2021-03-18 23:14:43 -04:00
Jeff Epler
d0125617fd
Merge pull request #4428 from kmatch98/bitmap-read-2
Add `reverse_rows` to speedy bitmaptools.readinto function
2021-03-18 18:41:35 -05:00
Jeff Epler
623ece2c73
Merge pull request #4429 from jepler/displayio-bitmap-memoryview
displayio.Bitmap: Make memoryview()able
2021-03-18 18:38:25 -05:00
microDev
bd95914e88
implement function to check usb connection 2021-03-18 10:00:01 +05:30
Scott Shawcroft
670375dc0d
Merge pull request #4426 from kmatch98/main
Add getter for displayio.Palette item transparency/opacity.
2021-03-17 18:13:39 -07:00
Jeff Epler
720d242b4f doc fix 2021-03-17 16:38:10 -05:00
Jeff Epler
c157ada90c displayio.Bitmap: Make memoryview()able 2021-03-17 16:26:45 -05:00
Kevin Matocha
c37a1f45f3 ran pre-commit for formatting fixes 2021-03-17 11:00:32 -05:00
Kevin Matocha
ef91e1752c merge upstream/main 2021-03-17 09:30:51 -05:00
Jeff Epler
bfc8c89536
Merge pull request #4403 from jepler/bitmap-read-2
bitmaptools: Add readinto, arrayblit
2021-03-17 07:57:31 -05:00
Kevin Matocha
592f89f6ae add back peculiar r to docstring 2021-03-16 20:45:55 -05:00
Kevin Matocha
5c3cce6f5d add is_transparent getter to displayio.Palette 2021-03-16 20:43:23 -05:00
Jeff Epler
074ba1daff more doc fixes 2021-03-16 19:05:06 -05:00
Jeff Epler
5810004bc9 fix doc error 2021-03-16 19:01:38 -05:00
Jeff Epler
e1dd396de7 fix stub docs 2021-03-16 13:37:04 -05:00
Jeff Epler
58679dc038 Merge remote-tracking branch 'origin/main' into bitmap-read-2 2021-03-16 12:21:50 -05:00
Jeff Epler
97b6664201 re-format with uncrustify 2021-03-16 12:20:09 -05:00
Kevin Matocha
870dadc85a update more docstrings 2021-03-16 10:42:46 -05:00
Kevin Matocha
a367e84cea update docstrings 2021-03-16 10:35:40 -05:00
Kevin Matocha
227ac67463 Add reverse_rows option to bitmaptools.readinto 2021-03-16 10:01:12 -05:00
gamblor21
bdc368895f Formatting 2021-03-16 08:39:44 -05:00
Jeff Epler
542fb58673 add arrayblit 2021-03-15 20:36:44 -05:00
Mark
e326d7ca80
Merge branch 'main' into rp_dp_parallel 2021-03-15 20:00:13 -05:00
microDev
a52eb88031
run code formatting script 2021-03-15 19:27:36 +05:30
Jeff Epler
3cbff45f9a
Merge pull request #4407 from jposada202020/RTC_doc_corrections
RTC and Touchin docs changes
2021-03-14 20:52:19 -05:00
Jeff Epler
651f54b4cc fix docs 2021-03-14 15:47:15 -05:00
jposada202020
1386a8104a RTC and Touchin docs changes 2021-03-14 16:20:40 -04:00
Jeff Epler
da030ce7d8
Merge pull request #4402 from jposada202020/analogio_doc_corrections
Change in documentation in Analogio
2021-03-14 15:00:48 -05:00
Jeff Epler
9133b23a37 bitmaptools: Add readinto
When reading uncompressed bitmap data directly, readinto can work
much more quickly than a Python-coded loop.

On a Raspberry Pi Pico, I benchmarked a modified version of
adafruit_bitmap_font's pcf reader which uses readinto instead of
the existing code. My test font was a 72-point file created from Arial.

This decreased the time to load all the ASCII glyphs from 4.9 seconds to
just 0.44 seconds.

While this attempts to support many pixel configurations (1/2/4/8/16/24/32
bpp; swapped words and pixels) only the single combination used by
PCF fonts was tested.
2021-03-14 13:57:46 -05:00
jposada202020
6a56d5dc73 Change in documentation in Analogio 2021-03-14 04:15:35 -04:00
Scott Shawcroft
b413535ee1
Merge pull request #4376 from kmatch98/displayio_bitmap
add fill_region and draw_line to bitmap_tools
2021-03-12 16:50:39 -08:00
gamblor21
5689307798 Changed frequency to match PIO having 2 instructions 2021-03-11 19:32:44 -06:00
gamblor21
b02b1e9979 Set frequency default 60Mhz 2021-03-11 19:32:44 -06:00
gamblor21
56a219911f Add frequency support to parallel bus 2021-03-11 19:32:43 -06:00
Lucian Copeland
6b2c9985ff Extract RTC, implement fake RTC deepsleep 2021-03-11 17:50:05 -05:00
Kevin Matocha
a9afa0d9d4 Move input checks to shared-module, update docstrings 2021-03-11 16:18:17 -06:00
Dan Halbert
08c5dbb003 use return values in STM PWMOut constructor, not exceptions 2021-03-11 08:52:47 -05:00
Kevin Matocha
85f0f07d51 add fill_region and draw_line to bitmaptools 2021-03-10 11:37:27 -06:00
Dan Halbert
24ac8152dd Clarify further; fix type error 2021-03-07 20:32:59 -05:00
Dan Halbert
1a6c021239 Add clarifying comment re carriage-return char. 2021-03-07 17:04:27 -05:00
Dan Halbert
a6cb7d7069 Document readline() and readlines() 2021-03-07 15:34:07 -05:00
Dan Halbert
d919b7fa4a fix #4352 2021-03-07 14:13:20 -05:00
Dan Halbert
8594396a07 Add caveat for usb_cdc.Serial.connected 2021-03-07 14:07:07 -05:00
jun2sak
51c7a49853 Merge branch 'main' into nrf52-sleep 2021-03-07 20:50:53 +09:00
Jeff Epler
b23c5b2d68 nvm: fix doc markup
closes #4336
2021-03-06 07:54:54 -06:00
Dan Halbert
cd48c5ee83
Merge pull request #4315 from dhalbert/rp2040-i2c-short-writes
RP2040: Implement short I2C writes (2 bytes or less) using bitbangio
2021-03-03 12:42:47 -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
Dan Halbert
f31b472309 Merge remote-tracking branch 'adafruit/main' into rp2040-i2c-short-writes 2021-03-02 15:17:12 -05:00
Dan Halbert
9939c59caa wip 2021-03-02 15:16:55 -05:00
Scott Shawcroft
e4f0e47d9f
Merge pull request #4233 from pewpew-game/displayio-group-list
displayio: make Group use a python list internally
2021-03-02 09:59:58 -08:00
Lucian Copeland
f1792c8474 Extract EXTI, create base sleep framework 2021-03-02 11:41:53 -05: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
ajs256
f722df70c8
Fix formatting in SPI docs
Close #4293 by changing  `..note::` to `.. note::`.
2021-03-01 09:06:24 -08:00
jun2sak
3e47e00291 address the pretending-to-deep-sleep issue. 2021-02-28 15:57:37 +09:00
Radomir Dopieralski
24473b7983 Separate out mp_obj_list_insert for use in display.Group
Note that for some reason this makes the binary 500 bytes larger!
2021-02-27 21:13:55 +01:00
Radomir Dopieralski
38fb7b511b Remove max_size from displayio.Group
Still accept it as an argument. Add deprecation note.
2021-02-27 20:52:38 +01:00
Radomir Dopieralski
e9953754ea Add displayio.Group.sort() method 2021-02-27 20:52:38 +01: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
Scott Shawcroft
52bc935fa7
A few minor fixes for corner cases
* Always clear the peripheral interrupt so we don't hang when full
* Store the ringbuf in the object so it gets collected when we're alive
* Make UART objects have a finaliser so they are deinit when their
  memory is freed
* Copy bytes into the ringbuf from the FIFO after we read to ensure
  the interrupt is enabled ASAP
* Copy bytes into the ringbuf from the FIFO before measuring our
  rx available because the interrupt is based on a threshold (not
  > 0). For example, a single byte won't trigger an interrupt.
2021-02-25 16:50:57 -08:00
Kevin Matocha
c883bb773b Rearrange input parameters 2021-02-24 16:03:50 -06:00
microDev
5d7fdafcde
implement suggested changes
- add internal buffering
- rtc initialization fix
2021-02-25 00:48:36 +05:30
Kevin Matocha
cd4d55a573 yet another sphinx try 2021-02-24 08:05:40 -06:00
Kevin Matocha
e858db07f0 Another sphinx try 2021-02-24 07:59:32 -06:00
Kevin Matocha
2815c6dafa More sphinx attempts 2021-02-24 07:49:34 -06:00
Kevin Matocha
af5ad50125 More sphinx fixes 2021-02-24 01:18:30 -06:00
Kevin Matocha
18658b77f3 Sphinx docstring updates 2021-02-24 01:00:13 -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
Dan Halbert
9d4442e298 handle reads/writes larger than buffers; add .write_timeout 2021-02-19 14:15:31 -05:00
microDev
b12ccefbe6
uart implementation for rp2040 2021-02-19 18:36:00 +05:30
Jeff Epler
5c758523c0 requested changes 2021-02-18 17:19:34 -06:00
Jeff Epler
ffae89b191 bitops: fix argument parsing 2021-02-18 16:10:57 -06:00
Jeff Epler
d56fe7691d bitops: doc correction 2021-02-18 15:44:51 -06:00
Jeff Epler
7fd4567893 bitops: rename from _bit_transpose, describe the algorithm 2021-02-18 15:41:23 -06:00
Jeff Epler
ac0ffc5656 _bit_transpose: fix docs 2021-02-18 11:45:48 -06:00
Jeff Epler
c284728621 bit_transpose: Support from 2 to 7 strands, not just 8 2021-02-18 11:33:13 -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
ed49c02feb add timeout; finish up for PR 2021-02-17 23:24:11 -05:00
Dan Halbert
c26de0136a works! no timeouts 2021-02-16 17:39:36 -05:00
Dan Halbert
0b8f1b9a90 wip: usb_cdc.serials 2021-02-15 20:06:18 -05:00
Dan Halbert
93d788543c Merge remote-tracking branch 'adafruit/main' into secondary-cdc 2021-02-15 20:03:53 -05:00
Dan Halbert
d54b5861a3 wip 2021-02-12 19:01:14 -05:00
Dan Halbert
3e4328140c fix off-by-one PWM top issue 2021-02-12 15:53:31 -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
d7305182f0 Remove adafruit_bus_device.SPIDevice.spi 2021-02-11 10:33:57 -05:00
Jeff Epler
ba2b65586f sdcardio: add a note about sharing the SPI bus with SD cards and other devices
Similar to https://github.com/adafruit/Adafruit_CircuitPython_SD/pull/44
2021-02-09 10:07:21 -06:00
Dan Halbert
3a68ac8abb
Merge pull request #3536 from pewpew-game/pew-get-ticks
Fix #3504: Don't use time module in pew.tick()
2021-02-08 17:50:44 -05:00
Dan Halbert
be500fd15c
Merge pull request #4136 from hierophect/socket-portmax
Socket: fix inconsistencies in argument types
2021-02-08 16:23:20 -05:00
Dan Halbert
f66caa29b9
Merge pull request #4146 from gamblor21/busdevice_write_read_fix
Fix write_then_readinto in adafruit_bus_device I2CDevice
2021-02-08 11:33:06 -05:00
Dan Halbert
1b7f3d11e7 wip 2021-02-08 10:57:41 -05:00
gamblor21
ea4a12005a Fix write_then_readinto 2021-02-06 10:33:38 -06:00
Lucian Copeland
4d26ffb447 Make timeout core types consistent 2021-02-05 12:32:41 -05:00
Scott Shawcroft
9140bfb5b2
Merge pull request #4049 from hierophect/sslsocket
Separate SSLSocket from Socket
2021-02-02 10:35:07 -08:00
Scott Shawcroft
a861498404
Merge pull request #4114 from tannewt/spidevice_spi
Add .spi accessor to SPIDevice
2021-02-02 09:53:10 -08:00
Scott Shawcroft
8fd6bff727
Add .spi accessor to SPIDevice
Fixes #4108
2021-02-01 20:03:23 -08:00
Scott Shawcroft
8789a2c8a9
Merge pull request #4110 from microDev1/rtc-rp
RP2040: Support for RTC
2021-02-01 19:47:44 -08:00
Scott Shawcroft
db7a962802
Merge pull request #4112 from gamblor21/longint_busdevice_fix
Fixed for boards without longint
2021-02-01 19:24:57 -08:00
gamblor21
0cf2df48c4 Fixed for boards without longint 2021-02-01 17:58:34 -06:00