Commit graph

1060 commits

Author SHA1 Message Date
Dan Halbert
d0dc144d4d fix ble_serial_connected() 2024-10-03 16:55:00 -04:00
foamyguy
a0d470aa16 webworkflow warn before leaving page during upload. Allow upload to succeed if user clicks into a directory. 2024-09-14 11:50:44 -05:00
Scott Shawcroft
799044c868
Merge remote-tracking branch 'adafruit/9.1.x' into merge_in_9.1.x 2024-09-12 15:14:53 -07:00
Dan Halbert
fad755d5e7
Merge pull request #9616 from tannewt/fix_c6_crash
Three fixes found for ESP32-C6
2024-09-12 18:12:20 -04:00
Scott Shawcroft
b5517cb04b
Always clear RX buffer on CTRL-C
Some serial sources clear their RX buffers and others didn't. This
cause CP to skip into the REPL based on characters typed before the
CTRL-C. The serial file transfer code looks for "press any key"
which is skipped in this case.

Fixes https://github.com/circuitpython/web-editor/issues/238
2024-09-12 13:35:25 -07:00
Scott Shawcroft
03b077dd91
Add deinit() to _bleio.Characteristic
Espressif's Characteristics allocate memory that may be on the
supervisor heap. We need to free it when stopping BLE workflow.
Otherwise, we leak the memory and eventually safe mode.

Fixes #9599
2024-09-12 13:35:25 -07:00
Dan Halbert
e5e9c5ca84
Merge pull request #9469 from dhalbert/merge-from-micropython-v1.22.2
Merge from micropython v1.22.2
2024-08-21 18:11:19 -04:00
Scott Shawcroft
28f3d91752
Unlock DotStar SPI before deinit 2024-08-21 12:44:40 -07:00
Scott Shawcroft
cedd677969
Fix Funhouse and update to IDF 5.3
The Funhouse problem was due to a locking change for SPI. The
Funhouse is one of a few boards with DotStar status LEDs that use
SPI and have this bug.

I thought it might be IDF related so I updated it first. :-)

Fixes #9486
2024-08-15 11:36:37 -07:00
wyrdsec
b580df5ab3
Merge branch 'adafruit:main' into main 2024-08-02 13:42:51 -04:00
Dan Halbert
be6fa2af21 merge from main 2024-07-29 17:41:46 -04:00
Dan Halbert
c11f2af3e7 wip: blink works on trinket M0 2024-07-27 08:06:20 -04:00
Dan Halbert
71f17b08fb wip: fixing compilation 2024-07-26 18:38:46 -04:00
2385aa6dfb Fix socket binding
.. & make web workflow bind to v6 if available. Binding v6 "any"
address also allows v4 connections
2024-07-17 18:00:04 -05:00
bee32ea826 Make return value of recvfrom_into & accept right for v6 addresses
only tested recvfrom_into as can't bind() v6 addresses yet

wifi workflow may be broken by this or maybe it was broken before
2024-07-17 17:15:22 -05:00
dc77f3146f serial_bytes_available: don't double-count bytes on usb cdc
In 9.0.x, serial_bytes_available returned a bool and tud_cdc_available was
harmlessly checked twice for any characters.

When the routine was changed to return an int, the double checking led to
over-reporting the number of characters available. In code that would attempt
to read this many bytes from sys.stdin, this made the read call block since
only 1 byte was actually available.

This behavior came up in the discussion of #9393. I don't mark this bug as
closing that one, because that issue seems to be reporting multiple things that
this change would not address, such as delays in `sys.stdout.write()` or
problems seen while using webserial.
2024-07-03 11:36:30 -05:00
Dan Halbert
21d2c865f1 Fix BLE adv timeout; ESP: don't sched handler on adv finish 2024-07-02 12:13:20 -04:00
Dan Halbert
f66313c93b
Merge pull request #9344 from tannewt/disable_ble_completely
Only start BLE for workflow when desired
2024-06-18 17:01:10 -04:00
Scott Shawcroft
b658ce988b
Only start BLE for workflow when desired
The previous implementation would always start BLE and rely on
advertising logic to make the workflow not available when on USB.

This change removes the "always enable" call in favor of a default
value that is on if 1) we determine we should be discoverable or 2)
we're already bonded over BLE.
2024-06-17 15:40:28 -07:00
Scott Shawcroft
ed2f32fadb
Enable deep sleep on all ESP chips
Features of each chip is documented in this spreadsheet:
https://docs.google.com/spreadsheets/d/1NyKzHOWeWMb8UttDDugeeOANZ4m-idMHM6kiTlUUVIg/edit?usp=sharing

Fixes #9056
2024-06-13 10:26:33 -07:00
Scott Shawcroft
4c85b5f02e
Fix other BLE builds 2024-06-12 11:22:00 -07:00
Scott Shawcroft
63aeb11d7e
Improve ESP BLE and turn on BLE workflow
The BLE workflow will broadcast publicly when the web workflow
isn't activated.
2024-06-11 16:21:40 -07:00
wyrdsec
ce9504f3d6
Merge branch 'adafruit:main' into main 2024-06-08 11:56:47 -04:00
wyrdsec
707026623f
Merge branch 'adafruit:main' into main 2024-06-06 20:30:44 -04:00
Dan Halbert
e4f6656df6 Further fix to use absolute paths in remote workflows 2024-06-06 16:56:24 -04:00
Dan Halbert
6ec5d3fabe web_workflow.c: use absolute path 2024-06-05 23:29:47 -04:00
wyrdsec
1214b699ca Pervasive Displays Aurora E-paper driver 2024-06-05 20:00:45 -04:00
Dan Halbert
3f4d9310ff CircuitPython files: replace STATIC with static 2024-05-20 11:02:17 -04:00
Dan Halbert
950b5d09d2 guard2once -s ... 2024-05-19 20:40:44 -04:00
Dan Halbert
dbef48d5e2 add #pragma once to all CircuitPython header files without any include guards 2024-05-19 20:38:07 -04:00
Dan Halbert
747b7619ea update headers of most CircuitPython-only files 2024-05-17 14:56:28 -04:00
Dan Halbert
daa11cb1c2 updates before header conversion 2024-05-17 14:56:28 -04:00
Scott Shawcroft
9ab8831d38
Merge pull request #9218 from jepler/mp3-esp
Enable mp3 output on esp32s3
2024-05-02 14:30:07 -07:00
08a440d19b espressif: Don't hold interrupts disabled a long time
.. just to prevent background tasks from running
2024-05-01 10:07:13 -05:00
Scott Shawcroft
6d802fe616
Fix ESP builds 2024-04-29 14:11:38 -07:00
Scott Shawcroft
6cbdb64d03
Fix builds without custom USB ID 2024-04-29 11:46:58 -07:00
Scott Shawcroft
28b7421124
Merge remote-tracking branch 'adafruit/main' into renode 2024-04-29 11:27:19 -07:00
Scott Shawcroft
5fa40ccc22
Fix cyw43 and build with usb_cdc 2024-04-26 15:59:51 -07:00
Scott Shawcroft
d4a46ba153
Always define CFG_TUD_ENABLED 2024-04-26 15:36:46 -07:00
Scott Shawcroft
40f6d531b3
Add missing file 2024-04-26 14:27:16 -07:00
Scott Shawcroft
0cbd8b2e0c
Add CIRCUITPY_USB_DEVICE config
This replaces CIRCUITPY_USB and makes room for CIRCUITPY_TINYUSB
when it may only be included for host support.
2024-04-26 11:58:49 -07:00
Scott Shawcroft
b63d422768
Fix more boards and docs 2024-04-23 16:04:42 -07:00
Scott Shawcroft
442def3e68
Add minimal Renode port
This runs in the Renode simulator and enables easier tracing and
debugging of the CircuitPython core. This port can also serve as
a starting point for new ports because it implements the minimal
necessary for the CP core to run.
2024-04-23 13:31:31 -07:00
Dan Halbert
c35ec758dd Merge remote-tracking branch 'adafruit/9.0.x' into 9.0.4-update 2024-04-17 15:39:10 -04:00
Dan Halbert
98957cccd8 change unneeded uint8_t decls to size_t or uint32_t 2024-04-11 14:15:41 -04:00
Dan Halbert
2fa97f3872 fix flash_cache_table allocation failures; clean up code 2024-04-11 14:00:37 -04:00
Scott Shawcroft
aca3191a58
Add Max3421E support for usb host
It is enabled on:
* SAMD51 boards with 1MB flash (SKU ending in 20A)
* Feather RP2040 DVI. Others have PIO usb host.
* All ESP32 boards.
* All nRF boards

Fixes #8676
2024-04-10 10:57:28 -07:00
Joshua
8b8927b24a Readded misssing prototypes. 2024-04-07 06:07:53 +09:30
Dan Halbert
817a7fa4af
Merge branch 'main' into main 2024-04-06 16:21:01 -04:00
Joshua
3d183bbc5f Fixed board_serial_bytes_available prototype error. 2024-04-07 05:30:56 +09:30