Commit graph

174 commits

Author SHA1 Message Date
Dan Halbert
782e25c337 shared/supervisor/usb_msc_flash.c: check for valid vfs from get_vfs() 2025-07-06 14:08:17 -04:00
Cooper Dalrymple
1dc462872b Remove gc_nbytes check 2025-05-15 08:51:46 -05:00
Scott Shawcroft
f5aef15f29
Reduce USB static buffers for ESP32-S2
This frees up more RAM for other things.

RAM started overflowing with #10281
2025-04-25 13:47:46 -07:00
Ryan Adolf
28856dbbcb Increase CFG_TUH_ENUMERATION_BUFSIZE 2025-04-22 16:59:14 -04:00
Scott Shawcroft
cb97ae6d40
Be stricter about what filesystems it works with.
Add Metro RP2350 definitions
2025-03-31 15:18:28 -07:00
Scott Shawcroft
2c0f9e9ac6
Merge remote-tracking branch 'adafruit/main' into automount_sd 2025-03-31 13:14:25 -07:00
Dan Halbert
416535a1b1 supervisor/shared/usb/usb_msc_flash.c: restore initialization of ejected array 2025-03-22 15:08:30 -04:00
Scott Shawcroft
d0c840094a
Automount SD cards
And make them available over USB MSC. They can be remount to make
them writable (slowly) from the host PC.

Fixes #9954. Fixes #8678. Fixes #3477
2025-03-12 16:27:09 -07:00
Scott Shawcroft
5616fc2a3c
Add support for saves partition
Suggested in #10045
2025-03-06 16:48:59 -08:00
Scott Shawcroft
effa01e2af
Improve Fruit Jam
* Add bus, port_numbers and speed to USB devices. Allows for
  differentiating identical devices.
* Autodetect display and adjust if widescreen
* Enable I2S DAC via its reset pin
* Show keyboard emoji in status bar. (Only works over serial connection
  now. Built in font doesn't have the emoji.)
2025-03-05 13:04:33 -08:00
eightycc
0a0eb7a4f6 Restore console_uart_printf, fix use of __ZEPHYR__. 2025-02-13 06:52:12 -08:00
Scott Shawcroft
7f0cc9e7b4
Add Zephyr port
This port is meant to grow to encompass all existing boards. For
now, it is a port while we transition over.

It is named `zephyr-cp` to differentiate it from the MicroPython
`zephyr` port. They are separate implementations.
2025-02-04 11:24:13 -08:00
Scott Shawcroft
91ecb6c04b
Fix many builds
* DWC common has been factored out.
* New time API to implement.
2024-12-02 12:37:15 -08:00
Scott Shawcroft
82d000417b
Enable USB on ESP32-P4 2024-11-27 16:06:54 -08: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
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
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
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
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
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
Dan Halbert
bb9968215c Runtime.serial_bytes_available: return count isntead of bool 2024-04-04 12:26:06 -04:00
Scott Shawcroft
12b4ac13e3
Call vTaskDelay directly in usb_background
This minimizes the delay added. (`port_yield()` does vTaskDelay(4)
so low priority tasks run.)
2024-03-05 15:56:11 -08:00
Scott Shawcroft
e0c6302b73
Improve RGBMatrix reliability
The guard against running when flash is disabled isn't perfect and
may lead to calling the row handler anyway. We were crashing due
to mp_hal_delay_us being in flash. So, move it to RAM.

Also move the panic handler to IRAM so we get nice output when this
happens.

Turn off JTAG by default so its pins can be used by code.py.

Fixes #8987
2024-03-05 12:29:05 -08:00
hathach
3d88402331
call tuh_hid_receive_abort() when detach from kernel driver
- add tuh_event_hook_cb() in SRAM, required when updated to latest tinyusb
- bump up pico-pio-usb to latest
- bump up tinyusb to latest for new tuh_hid_receive_abort(), and all endpoint abort when
SET_CONFIGURATION
2024-03-04 18:16:32 +07:00
339d01f58b Prevent out-of-range reads via msc
Some ports implement their own protection against this at a low level
but it doesn't hurt to add it here instead.

Based on a patch from @drath42

Closes: #8788
2024-02-16 10:28:53 -06:00
Scott Shawcroft
f037a1202a
Require 64 bytes extra CDC RX buffer
Once the buffer has less that an endpoint's worth, TinyUSB won't
request more from the host. When that happens, ctrl-c will no
longer be sent to the device and TinyUSB won't find the wanted
character.

Fixes #4444
2024-02-15 16:24:06 -08:00
da5ba9a76a Rename & improve doc 2024-01-31 12:03:12 -06:00
1c95a85ceb Merge remote-tracking branch 'origin/main' into q-and-d-uvc 2024-01-31 08:27:13 -06:00
ebe839044f
Merge pull request #8807 from iyalosovetsky/main
usb_host keyboard, keys f1-f12, ctrl-left, ctrl-right, ctrl-up, ctrl-down, page down, page up, insert, delete, pause in VT100 CSI
2024-01-28 15:05:01 -06:00
a28e92974e Fix keypad page up
This bug was always present in the key map.
2024-01-28 11:45:46 -06:00
fa2e365f6c Reorder FLAG_STRING | FLAG_CTRL lines
this means that the test for FLAG_CTRL together with FLAG_STRING is
not needed. Instead, the FLAG_STRING | FLAG_CTRL row, when
encountered earlier, will automatically take precedence.
2024-01-28 11:45:26 -06:00
1983ddad86 Remove commented-out lines 2024-01-28 11:44:11 -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
Dan Halbert
9aa73fd43f shared-module/usb_hid: allow HID to wake sleeping host computer 2024-01-24 11:12:49 -05: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
Ihor Yalosovetskyi
5f5e4a6f16 rc03 ctrl with f1-f12 ins del pgdown pgup home end bug fix 2024-01-20 17:30:53 +02:00
Ihor Yalosovetskyi
5ff4d345d8 rc03 ctrl with f1-f12 ins del pgdown pgup home end bug fix 2024-01-20 17:25:26 +02:00
Ihor Yalosovetskyi
a63752340e rc02 ctrl with f1-f12 ins del pgdown pgup home end 2024-01-20 05:06:11 +02:00
Ihor Yalosovetskyi
60673579cb rc02 ctrl with f1-f12 ins del pgdown pgup home end 2024-01-20 04:44:45 +02:00
Ihor Yalosovetskyi
769e7533bf rc02 ctrl with f1-f12 ins del pgdown pgup home end 2024-01-20 04:42:21 +02:00
Ihor Yalosovetskyi
045a48af67 rc01 2024-01-19 15:58:12 +02:00
iyalosovetsky
18dad110a7
Update host_keyboard.c remove trail whitespace 2024-01-17 03:51:04 +02:00
iyalosovetsky
ae7e9173d8
Update host_keyboard.c 2024-01-17 03:36:11 +02:00
iyalosovetsky
6a7ebaf6a1
Update host_keyboard.c 2024-01-17 03:33:41 +02:00
iyalosovetsky
3cc04f81f9
Update host_keyboard.c
Added the ability to work with the function keys f1-f12, ctrl-left, ctrl-right, ctrl-up, ctrl-down, page down, page up, insert, delete, pause. in the format of command VT 100
2024-01-17 03:30:27 +02:00