Commit graph

1005 commits

Author SHA1 Message Date
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
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
Dan Halbert
d8bd26c560
Merge pull request #9005 from jepler/issue8980
Postpone interacting with the web workflow if a SPI bus is locked
2024-03-05 12:00:33 -05:00
c0064dcf9f Postpone interacting with the web workflow if a SPI bus is locked
I tested this by fetching a .txt file repeatedly using curl while
running the fancy camera demo. (100+ times without failure). I also
repeatedly loaded the filesystem view http://.../fs/#/sd/ which worked
10+ times without failure, but does take some time (multiple seconds) to
show a listing with a few dozen files.

(I suspect there's an accidentally quadratic behavior in oofatfs to stat
every file in a directory, because it repeatedly does a linear search of
the directory for the stat information of each file, but that's not an
issue for Right Now(TM))

Closes: #8980
2024-03-04 20:23:37 -06:00
Dan Halbert
78cbc8378c
Merge pull request #8994 from tannewt/ww_default_writable
Grab FS lock to test writability
2024-03-04 16:54:24 -05:00
Scott Shawcroft
9cc668b65d
Revert most changes. Only change web workflow writable 2024-03-04 13:45:06 -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
Scott Shawcroft
95c4ffb6ef
Rename verify_fs_writable to filesystem_lock_raise 2024-03-01 14:54:17 -08:00
Scott Shawcroft
69105b24f0
Fix unix build 2024-02-29 14:36:15 -08:00
Scott Shawcroft
ddf9aec00e
Grab FS lock to test writability
Checking is_writable_from_python always follows USB policy even if
it is unplugged. Fixes #8986

Also does bare minimum for #8961.
2024-02-29 14:05:11 -08:00
Scott Shawcroft
02a488649f
Merge pull request #8923 from jepler/groups-in-rom
displayio: add, check "readonly" flag for groups
2024-02-16 09:49:14 -08: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
d7dd571326 Rename the "in_rom" flag to "readonly" 2024-02-15 22:17:00 -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
75ec56844c displayio: add, check "in rom" flag for groups
closes: #8873
2024-02-14 19:39:00 -06:00
Scott Shawcroft
9537b1dca7
Improve neopixel on ESP
Greedily grab as much RMT memory as we can. It blocks other RMT
transmit channels but we only use it temporarily anyway. The more
we can grab, the fewer interrupts are needed to keep the transmit
going.

Flickers may still happen due to file system writes but most of the
time the animation just pauses.

On ESP32, move CircuitPython to the second core. This helps NeoPixel
by moving the RMT interrupt to the second core as well.

When testing ESP32 I noticed that settings.toml writes won't apply
until after hard reset. This removes that constraint but still
requires the password to enable the web workflow.

Fixes #3835
2024-02-14 15:10:07 -08:00
Scott Shawcroft
cd28f1d678
Merge pull request #8860 from jepler/create-sd-placeholder
supervisor: Create a file /sd/placeholder.txt with a note
2024-02-02 09:54:48 -08:00
Scott Shawcroft
221af8770e
Update placeholder text 2024-02-01 10:18:43 -08:00
3a9e439d64 update placeholder.txt contents based on review comment 2024-01-31 12:40:50 -06: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
96ef9c0caf don't create placeholder.txt if it'll just be empty 2024-01-29 16:48:21 -06:00
7c3adbff8f annotate function that may be unused 2024-01-29 16:04:08 -06:00
d09dd6d4ea Revert "supervisor: Put more info in settings.toml"
This reverts commit 02ddb3cacc.
2024-01-29 16:03:06 -06:00
02ddb3cacc supervisor: Put more info in settings.toml
This list sadly has to be kept manually up to date, but it may be
helpful to people!
2024-01-29 14:00:11 -06:00
056ca321b1 supervisor: Create sd/placeholder.txt
.. so that a freshly formatted CP device can mount an SD card at `/sd`.
2024-01-29 13:57:59 -06:00
616b14fd8d supervisor: Prepare for multiple files with optional contents 2024-01-29 13:57:44 -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
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
Dan Halbert
9aa73fd43f shared-module/usb_hid: allow HID to wake sleeping host computer 2024-01-24 11:12:49 -05:00
Scott Shawcroft
9538e0067b
Merge remote-tracking branch 'adafruit/main' into ww_sd_card 2024-01-22 17:14:06 -08: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
Scott Shawcroft
61ec3280d1
Optimize error messages 2024-01-19 21:31:58 -08: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
Scott Shawcroft
234ce7cfa4
Fix move, mkdir and tweak dir listing
Makes sure mount point is a directory.

Fixes #8110 by making it explicit that progress is per-file.
2024-01-18 14:22:16 -08: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