Commit graph

3137 commits

Author SHA1 Message Date
Dan Halbert
064ac2d932 address review; fix STM; add limitation for STM 2024-04-06 09:26:59 +10:30
Dan Halbert
e847999a42 Runtime.serial_bytes_available: return count isntead of bool 2024-04-06 09:26:58 +10:30
Fabien Chouteau
8f55dfeb3d shared-module/fourwire/FourWire.c: make the chip_select pin optional
If there's only one device on the bus, the chip_select pin of the
peripheral can be fixed in hardware, therefore lowering the number of
pins required on the microcontroller side.

This patch allows this by making the chip_select pin optional.
2024-04-06 09:23:10 +10:30
Scott Shawcroft
fbd9a6e410
Merge pull request #9141 from dhalbert/serial_bytes_available
Runtime.serial_bytes_available: return count instead of bool
2024-04-05 10:20:02 -07:00
Dan Halbert
8027efe245
Merge pull request #9106 from wee-noise-makers/fourwire_optional_cs
shared-module/fourwire/FourWire.c: make the chip_select pin optional
2024-04-04 22:38:06 -04:00
Dan Halbert
4b44e324a5 address review; fix STM; add limitation for STM 2024-04-04 13:30:57 -04:00
Scott Shawcroft
680ee119b5
Merge pull request #9135 from jepler/update-adafruit-floppy
Update floppyio to use newer adafruit_floppy, implement pio-based flux capture on rp2040
2024-04-04 09:56:51 -07:00
Dan Halbert
bb9968215c Runtime.serial_bytes_available: return count isntead of bool 2024-04-04 12:26:06 -04:00
64b822cb66
Apply suggestions from code review
Co-authored-by: Scott Shawcroft <scott@tannewt.org>
2024-04-03 17:47:34 -05:00
Scott Shawcroft
436f9829f8
Merge pull request #9140 from elpekenin/fix/epd_refresh
Fix `EPaperDisplay.time_to_refresh`
2024-04-03 13:39:09 -07:00
Dan Halbert
5a7ac6fb63 document Espressif AnalogIn limitations 2024-04-02 19:53:30 -04:00
9efb034cba Add pio-based flux capturing for rp2040 2024-04-02 15:42:28 -05:00
1be36bd7cb Add floppyio to unix port, test mfm decoding 2024-04-02 15:42:28 -05:00
7d2e46aa19 Update adafruit_floppy 2024-04-02 14:57:20 -05:00
elpekenin
70c0957583 fix #9129 2024-04-02 17:08:03 +02:00
Dan Halbert
c71cf85641 espressif/common-hal/wifi/Radio.{c,h} handle new ESOP-IDF 5.2.1 auth failure codes 2024-03-31 21:15:58 -04:00
Fabien Chouteau
659c38562b shared-module/fourwire/FourWire.c: make the chip_select pin optional
If there's only one device on the bus, the chip_select pin of the
peripheral can be fixed in hardware, therefore lowering the number of
pins required on the microcontroller side.

This patch allows this by making the chip_select pin optional.
2024-03-30 11:04:18 +01:00
Dan Halbert
e10b179114 Merge remote-tracking branch 'adafruit/9.0.x' into 9.0.x-to-main-2024-03-27 2024-03-27 11:49:32 -04:00
e5f0579d6c SSLSocket: implement setsockopt (untested) 2024-03-25 09:24:57 -05:00
xs5871
3e184e994c
Add state integration based debouncing to the keypad module 2024-03-22 19:17:23 +00:00
8c5d9d28d8 ssl: make bind & listen into void functions (they throw exceptions) 2024-03-21 14:06:32 -05:00
b330989704 sslsocket: Simplify handling the timeout value
We're just going to pass it down to the underlying socket, so don't
parse it, multiply it, etc.
2024-03-21 13:54:40 -05:00
c793a021b8 ssl: work on anything implementing the socket protocol
In principle this allows core SSL code to be used with e.g., wiznet
or airlift sockets. It might actually be useful with wiznet ethernet devices
(it's probably not with airlift)
2024-03-21 13:54:40 -05:00
5973c4a86c socketpool: factor out constants
This header can be used by ssl even if there's no core socketpool
2024-03-21 13:54:40 -05:00
0c1db5e0cc socketpool: add type property to Socket objects
cpython socket objects have a `type` property which gives their
type as an integer (e.g., SOCK_STREAM). Add this for compatibility with
standard Python. It's needed for ssl, which currently just grabs the
value directly from an internal structure (naughty!)
2024-03-21 13:54:40 -05:00
7e7918ea80 socketpool: alphabetize dict names 2024-03-21 13:54:40 -05:00
foamyguy
7fd13b41b2 update busdisplay docstring example code 2024-03-21 11:31:56 -05:00
Scott Shawcroft
e81e5587a2
Merge pull request #9062 from dhalbert/nrf-to-nordic
rename ports/nrf to ports/nordic
2024-03-20 09:48:12 -07:00
Dan Halbert
dc69c29dac rename ports/nrf to ports/nordic 2024-03-19 17:36:57 -04:00
CDarius
d8a4c5088d Fix documentation 2024-03-19 10:21:11 +01:00
CDarius
bb683fa4cf Renamed module 'keypaddemux' in 'keypad_demux' and fix documentation 2024-03-19 09:59:02 +01:00
CDarius
8883416349
Update shared-bindings/keypaddemux/DemuxKeyMatrix.c
Co-authored-by: Dan Halbert <halbert@adafruit.com>
2024-03-18 17:43:37 +01:00
CDarius
8f1a4fdbc0 Fix documentation 2024-03-18 17:34:05 +01:00
CDarius
88b4e38625 Moved DemuxKeyMatrix in the keypaddemux module 2024-03-18 17:11:34 +01:00
CDarius
d7bc2c26d7 Disabled DemuxKeyMatrix in all atmel-samd boards. Some boards do not have enuogh flash space 2024-03-13 12:12:38 +01:00
CDarius
b0f67be079 Merge branch 'main' into cardputer_keyboard 2024-03-12 10:30:53 +01:00
CDarius
c5c78d3235 Moved DemuxKeyMatrix from board specific to a shared module 2024-03-12 10:28:08 +01:00
RetiredWizard
46c077766b Fix serial_bytes_available documentation 2024-03-11 00:51:53 -04:00
Scott Shawcroft
8d16e8e45f
Tweak watchdog
* Make setting timeout "feed" the watchdog.
* Fix #9010, timing on ESP
2024-03-06 12:17:31 -08:00
Dan Halbert
ffa45dedb1
Merge pull request #8989 from MariuszCwikla/hid_interface_name
usb_hid.set_interface_name
2024-03-03 10:22:27 -05:00
Mariusz Ćwikła
52c38c8914 usb_hid.set_interface_name: use port_malloc to allocate memory for interface name 2024-03-03 09:11:59 +01:00
MariuszCwikla
bf0f9e4125
Reword usb_hid.set_interface_name
Co-authored-by: Dan Halbert <halbert@halwitz.org>
2024-03-02 13:32:19 +01:00
Scott Shawcroft
a13e65d2d1
Add specific conf.py for RTD 2024-02-29 10:51:41 -08:00
Mariusz Ćwikła
898708a1cc usb_hid.set_interface_name 2024-02-28 16:34:34 +01:00
Dan Halbert
c219d89b1f
Merge pull request #8820 from romkey/8790-ap-connected-devices
New methods to get list of associated stations in access point mode and get maximum number of stations that can be associated
2024-02-22 09:28:53 -05:00
Dan Halbert
135f4f90a1
Merge pull request #8966 from tannewt/samd_pulsein_reset
Switch to finaliser for PWMOut and audiopwmio
2024-02-21 21:14:38 -05:00
Scott Shawcroft
777d79a6af
Switch to finaliser for PWMOut and audiopwmio
Fixes #8726 which was caused by a mix of bulk reset and finaliser
use.

Work towards #8960.
2024-02-21 11:53:29 -08:00
Scott Shawcroft
605c39c8db
Fix ssl.SSLSocket bind() error checking
Non-ssl sockets now return size_t error numbers, not bool.

Fixes #8947
2024-02-20 15:46:06 -08:00
John Romkey
d1a10a8f42 removed max_stations call - difficult to do properly on Espressif and no one asked for it 2024-02-20 10:02:43 -08:00
John Romkey
b0800eeee8 updated doc string on stations_ap 2024-02-18 21:57:31 -08:00
John Romkey
d0bfd3dae9 Merge branch 'main' into new 2024-02-18 21:50:30 -08:00
John Romkey
608c01a4d3 stations_ap now returns None instead of throwing an exception if not in AP mode
return value is now a list of named tuples with three elements

IP address is now None instead of 0.0.0.0 if there's no lease information
2024-02-18 21:47:52 -08:00
Scott Shawcroft
9f3987aa3c
Require explicit socket port reuse
Doing it implicitly can lead to mistaken socket leaks and reuse.
It now matches CPython.

Fixes #8443
2024-02-16 14:31:19 -08:00
294d563d04
Merge pull request #8928 from tannewt/imx_fixes
Numerous iMX fixes and SDK update
2024-02-16 10:51:01 -06:00
Scott Shawcroft
4d1f558361
Numerous iMX fixes and SDK update
* Fixes #4954. Leaving GPIO in output mode messed with ADC readings.
* Fixes #8018 and fixes #6537. UART rx was more complicated than it needed to be.
* Fixes #5581. uart reset is handled by finalizer. Added i2c_reset()
  call and reservation check.
2024-02-15 15:34:20 -08:00
9abe273afa mbedtls: move to shared-module
this enables the implementation to be shared among ports.
2024-02-15 13:30:09 -06:00
0d1e4dbbb0 random: fix getrandbits(0)
this is defined by python (returns 0) and tested in a test
2024-02-13 17:00:52 -06:00
85525c7e63 Use MICROPY_FLOAT_CONST 2024-02-13 17:00:52 -06:00
Dan Halbert
49d952c516
Merge pull request #8909 from tannewt/replace_legacy_esp_drivers
Remove old pcnt, rmt and timer group drivers
2024-02-13 17:58:08 -05:00
Scott Shawcroft
d1e710fb4b
Merge remote-tracking branch 'adafruit/8.2.x' into merge_in_8.2.x 2024-02-13 11:18:56 -08:00
RetiredWizard
44e58624ed Add fixes to a couple incorrect type annotations (#8895) 2024-02-13 13:07:57 -05:00
Scott Shawcroft
b1609ab552
Remove old pcnt, rmt and timer group drivers
The new ones handle resource tracking for us. They also do a
better job running when the flash cache is disabled, which is the
source of bugs when interacting with flash over USB.

Fixes #6998 and fixes #8379
2024-02-12 16:09:25 -08:00
RetiredWizard
2490303a23 Add pre-commit changes (black 24.11) formattings changes 2024-02-12 16:56:21 -05:00
foamyguy
0ea8e58aec example code Bitmap argument 2024-02-11 16:50:58 -06:00
9a71fdb93b Fix a couple of incorrect type annotations
h/t @justmobilize in https://github.com/adafruit/circuitpython/issues/8891
2024-02-08 14:59:58 -08:00
Scott Shawcroft
50acd03d1d
Fix type stub 2024-02-07 13:51:34 -08:00
Scott Shawcroft
e82f7be485
Merge remote-tracking branch 'adafruit/main' into esp_parallelbus 2024-02-07 10:56:14 -08:00
foamyguy
3c969c41ef remove if, remove +/- 1, add blit test 2024-02-05 09:32:22 -06:00
foamyguy
00a31147f0 code format 2024-02-03 17:27:16 -06:00
foamyguy
d1f9579b84 only validate range if max > min 2024-02-03 17:18:43 -06:00
3fbbc7597b fix markup 2024-01-31 12:42:48 -06:00
da5ba9a76a Rename & improve doc 2024-01-31 12:03:12 -06:00
1c52844cf3 fix signature of function 2024-01-31 09:06:25 -06:00
1c95a85ceb Merge remote-tracking branch 'origin/main' into q-and-d-uvc 2024-01-31 08:27:13 -06:00
Scott Shawcroft
3b15931724
Re-enable paralleldisplaybus on ESP
Add lilygo t-display s3 because it has a parallel display.

Fixes #8437
2024-01-30 11:39:00 -08:00
43c036aa48 fix stub documentation 2024-01-30 12:11:26 -06:00
8c85fe2348 fix type annotations 2024-01-29 16:06:24 -06:00
f5bf485426 use handy macro instead 2024-01-29 11:15:56 -06:00
943825f8be Add bitmapfilter.blend
This can perform arbitrary channel mixing between two images.
Alpha blend & maximum functions are demonstrated in the test.
However, it should make most of the usual photo editing blends
possible. (for dissolve, fill a mask bitmap with random values,
which may be expensive to do from circuitpython code; we can
specifically accelerate it if we need to)
2024-01-29 11:15:35 -06:00
f2c40d77d2 uvc: remove traces of the bitmap mode of operation 2024-01-26 09:29:03 -06:00
e47c58ae34 uvc: Add UVCFramebuffer
This replaces the earlier, Bitmap-based way of interacting with the
UVC framebuffer.

Typical usage:
```py
displayio.release_displays()
display = frambufferio.FramebufferDisplay(uvc.UVCFramebuffer())
```

This works on a MacroPad with a 128x128 framebuffer, but does not work
on a QT Py esp32s3.

On esp32s3, having the UVC-configuring line alone causes a hard-fault
at startup. However, disabling some other USB devices allows it to boot
and run code.py:
```py
import uvc
import usb_hid
import usb_midi

usb_hid.disable()
usb_midi.disable()

uvc.enable_framebuffer(64, 64)
```
however, as far as I can tell within qv4l2, the device never actually
transmits a frame of data (received frame count never increases).
I have not yet analyzed this failure in further detail.
2024-01-25 13:59:29 -06:00
Dan Halbert
370b011081
Merge pull request #8830 from dhalbert/hid-wakeup
shared-module/usb_hid: allow HID to wake sleeping host computer
2024-01-25 14:44:02 -05:00
d89ccbe9c8
Add swapbuffers
this still seems to encounter some tearing, but it's not clear to me
why. It reduces it greatly.
2024-01-25 12:42:25 -06:00
Scott Shawcroft
1b25e6472b
Consolidate PWMOUT error enum
We already consolidated the resulting message
2024-01-25 10:13:04 -08:00
Dan Halbert
62da707623 shared-bindings/usb_hid: add wakeup documentation 2024-01-24 14:07:52 -05:00
8d6d559b02
uvc: make width, height boot configurable; disable by default 2024-01-24 10:32:23 -06:00
Scott Shawcroft
9538e0067b
Merge remote-tracking branch 'adafruit/main' into ww_sd_card 2024-01-22 17:14:06 -08:00
Scott Shawcroft
8426773af4
Standardize more error messages to save space 2024-01-22 17:08:30 -08:00
Phil Underwood
9f016796e0 Make range check test against source bitmap, not destination 2024-01-22 16:53:00 +00:00
6b74263a71
uvc: Experimental module for USB video
This allows the CircuitPython device to act as a UVC video source.
2024-01-22 10:44:42 -06:00
3615745956
typo 2024-01-22 10:44:36 -06:00
Scott Shawcroft
61ec3280d1
Optimize error messages 2024-01-19 21:31:58 -08:00
152890b8a8
improve documentation again 2024-01-18 17:40:47 -06:00
961a63b3ee
Require use of the ChannelMixer / ChannelScaler types in mix()
.. and update the test accordingly, fixing a bug discovered in the
process.
2024-01-18 17:16:44 -06:00
ff3947a74a
bitmapfilter: improve documentation 2024-01-18 13:25:13 -06:00
2ed31b687a
bitmapfilter: Doc improvements. 2024-01-18 11:24:55 -06:00
ce5c108642
bitmapfilter: Doc improvements. 2024-01-18 10:22:30 -06:00
1ff6e1a025
Add namedtuple objects for mix() operation variants 2024-01-18 09:29:46 -06:00
c8bb1f527e
Doc improvements 2024-01-18 09:29:19 -06:00
db7ade2609
Update __init__.c 2024-01-17 21:22:07 -06:00