Commit graph

1116 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
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
Joshua
e956f2994b Updated to use ringbuf and an event callback. 2024-04-06 12:53:08 +10:30
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
Joshua
4d8310e374 Fixed precommit spacing problems. 2024-04-05 12:55:14 +10:30
Joshua
090f330ad5 Added support for Cardputer keyboard input. 2024-04-05 10:39:04 +10:30
Dan Halbert
4b44e324a5 address review; fix STM; add limitation for STM 2024-04-04 13:30:57 -04: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
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
Scott Shawcroft
25e862d110
Make SD cards available over web workflow
This changes storage.mount() to require that a mount point exist
on the parent file system.

A bug in background tasks is also fixed where the function
parameter is cleared on pending callbacks during "reset".

Disk usage is shown on the directory listing and changes based on
the mounted file system. Writable is also loaded per-directory.

Fixes #8108. Fixes #8690. Fixes #8107.
2024-01-16 14:12:16 -08:00
12b7997801
Fix port_realloc to return moved pointer
(there were no uses of port_realloc to fix)
2024-01-05 14:16:00 -06:00
2f325740c2
Merge remote-tracking branch 'origin/8.2.x' into merge-8.2.x 2023-12-29 15:05:19 -06:00
CarsonCoder
211c307f79 At proto support for espressif port + global 2023-12-23 17:59:31 -05:00
Dan Halbert
c3f8e0f551
Merge pull request #8667 from tannewt/ww_large_file
Improve web workflow error handling
2023-11-28 23:24:55 -05:00
Scott Shawcroft
96b0c211d1
Fix websocket input processing
It was skipped in many cases which breaks ctrl-cing running code.

Fixes #8132
2023-11-28 14:10:37 -08:00
Scott Shawcroft
8208ca3c6f
Improve web workflow error handling
* Disable Nagle at the end of error messages so they are sent before
  the socket is closed.
* Correctly discard file contents when the PUT file is too large.
* Correctly reset file size after failure to setting it too large.
* Change diskinfo.json to be list of disks in preparation of supporting
  multiple disks.
* Bump version to 3 for the above change.
* Document diskinfo.json.

Fixes #8109
2023-11-28 12:02:33 -08:00
9b2bc6b349
note an assmued invariant that may not be obvious 2023-11-28 13:38:13 -06:00
a38cd711ce
translate: share vstr_add_chr's implementation of utf8 encoding
this saves ~44 bytes on trinket_m0
2023-11-28 08:13:18 -06:00
Dan Halbert
75fcacd481
Merge pull request #8575 from dhalbert/8.2.x-to-main-2023-11-09
merge 8.2.x to main
2023-11-10 20:42:13 -05:00
Bob Abeles
c83e203d37 Change part type to 0x06, Big FAT12/16 CHS 2023-11-10 12:07:02 -08:00
Dan Halbert
3a34acb93c merge 8.2.x to main 2023-11-09 19:58:34 -05:00
Scott Shawcroft
eb1b27431a
Fix pre-commit 2023-11-06 11:15:38 -08:00
Bob Abeles
dc2dc9d058 Fix off-by-one in flash block read with fake MBR 2023-11-06 08:24:41 -08:00
Scott Shawcroft
8137e2d6d2
Switch all ports to auto-growing split heap
This simplifies allocating outside of the VM because the VM doesn't
take up all remaining memory by default.

On ESP we delegate to the IDF for allocations. For all other ports,
we use TLSF to manage an outer "port" heap. The IDF uses TLSF
internally and we use their fork for the other ports.

This also removes the dynamic C stack sizing. It wasn't often used
and is not possible with a fixed outer heap.

Fixes #8512. Fixes #7334.
2023-11-01 15:24:16 -07:00
Daniel James
f9d3ec5027
Support for publishing TXT records via mDNS
- Update lwIP+Raspberry Pi implementation to use lwIP API correctly
- Add translations
2023-10-30 20:39:38 -07:00
7fe886aeae
Fix mpy-cross and lto builds (again) 2023-10-30 14:54:22 +01:00
8724b43e15
revert incorrect translate() change 2023-10-30 10:37:22 +01:00
774f6ac6ab
Switch to using MP_ERROR_TEXT instead of translate, globally 2023-10-30 09:49:06 +01:00
de541cf155
Fix pointer-ness, const-ness of compressed messages
micropython puts the pointer-ness into the typedef; we can put the
const-ness there too.

this reduces the delta to micropython; for instance, emitinlinextensa
and emitinlinethumb now match upstream.
2023-10-25 21:40:11 +02:00
54a5878ee0
WIP 2023-10-25 21:24:52 +02:00
55874b6470
Rename compressed_string_t to mp_rom_error_text_t to match upstream 2023-10-25 08:14:13 +02:00
Scott Shawcroft
e1df598199
Split displayio hardware support from core
These are moved:
* Display -> busdisplay.BusDisplay
* FourWire -> fourwire.FourWire
* EPaperDisplay -> epaperdisplay.EPaperDisplay
* I2CDisplay -> i2cdisplaybus.I2CDisplayBus

`paralleldisplay` is now `paralleldisplaybus` (and registered as
`paralleldisplay` too).

Bus related helpers are split out of display_core into bus_core.
It is in still displayio since it is a dependency of both
busdisplay and epaperdisplay.

Fixes #7667
2023-10-24 15:43:34 -07:00
RetiredWizard
5dfe92ba8e web_workflow: adjust indent and move #endif 2023-10-24 16:30:19 -04:00
Pascal Bakhuis
621805639b Added support the Waveshare ESP32-S3-Zero and GRB status LEDs 2023-10-21 01:22:46 +01:00
Scott Shawcroft
5a19971efd
Fix pre-commit 2023-10-16 10:46:11 -07:00
Scott Shawcroft
9633c4e78f
Merge remote-tracking branch 'adafruit/main' into v1.20-merge 2023-10-11 11:21:57 -07:00
Scott Shawcroft
2910dea6fd
Almost fix extra_coverage test 2023-10-11 10:04:02 -07:00
Dan Halbert
68a2927385 MP_REGISTER_ROOT_POINTER for port-specific root pointers 2023-09-29 15:46:42 -04:00
Dan Halbert
1c388ab315 finish converting to MP_REGISTER_ROOT_POINTER() 2023-09-29 10:49:34 -04:00
Dan Halbert
76ff01452b Trinket M0 comes up; still very much wip 2023-09-28 16:22:10 -04:00
Dan Halbert
4d175ab41a convert to MP_DEFINED_CONST_OBJ_TYPE() 2023-09-19 21:09:29 -04:00
Dan Halbert
2c0fa0f7dc initial merge from v1.20.0; just satisifying conflicts 2023-09-19 11:10:12 -04:00
Scott Shawcroft
4087960dfd
Fix MDNS. C3 works 2023-09-14 15:04:07 -07:00
Scott Shawcroft
0928a95bb2
Merge pull request #8351 from jepler/dotclockframebuffer
Dotclockframebuffer
2023-09-07 13:21:29 -07:00
Scott Shawcroft
e776f3840f
Merge pull request #8367 from bill88t/web_workflow_disable
Web workflow skip init when no password, freeing socket. Also reconnect wifi on reload.
2023-09-05 13:47:05 -07:00
Scott Shawcroft
e0fa155037
Merge pull request #8327 from jepler/translation-compression-qstr
Use qstrs to improve compression
2023-09-05 13:12:13 -07:00
Bill Sideris
5869af395e
Wifi fully seperate from web-workflow 2023-09-05 22:39:41 +03:00
5e26862b2c
Allow use of CONFIG_SPIRAM_USE_CAPS_ALLOC
.. and switch makerfabs tft7 over to it as a test.

We have our existing way of "reserving" PSRAM for esp-idf (we actually
control it all but add back the "reserved" part). However, this does
not work with off the shelf esp_lcd, which only will allocate a
framebuffer in PSRAM if CONFIG_SPIRAM_USE_CAPS_ALLOC (or CONFIG_SPIRAM_USE_ALLOC)
is defined, not if CONFIG_SPIRAM_USE_MEMMAP is.

This new way is possibly compatible with more esp-idf code, but it complicates
CircuitPython's initial startup since nothing until port_heap_init is
permitted to use the CP heap or supervisor allocator. In practice this
seems to be OK today.

Right now this doesn't change the setting across all boards with PSRAM and so
it does not revert esp-idf to its prior state. Instead, what I'm thinking is
that we can do it during or just after the IDF5 update when sdkconfig files
will be getting an overhaul anyway.
2023-09-05 12:43:22 -05:00
Bill Sideris
9eaae37dfc
When no password is passed, connect to wifi but do not init web_workflow. 2023-09-05 19:31:18 +03:00
5c23e28208
add explanation for newer compression features 2023-08-31 13:27:16 -05:00
17015b48ad
translations don't always use unicode code points now 2023-08-30 10:09:50 -05:00
Bill Sideris
f204b17164
Disable dotfiles on boards without native usb 2023-08-29 17:23:17 +03:00
Bill Sideris
029c912bf0
Comment and reorder the files creation. 2023-08-28 17:03:32 +03:00
Bill Sideris
57ac916ccd
.Trash-1000 on filesystem creation 2023-08-27 23:29:08 +03:00
RetiredWizard
8fbde14286 utilize CIRCUITPY_CONSOLE_UART_BAUDRATE parameter 2023-08-24 14:50:23 -04:00
4d8b354c13
Use qstrs to improve compression
any qstr of >= 3 chars long is a candidate for use; the input byte value
(1) is used to indicate a fixed-length qstr number follows.

Before accounting for the code size changes, this saves ~100 bytes
on trinket m0, but it may end up being a wash due to added code.

A cutoff of length>2 is slightly better for ja and ru and worse for others.
This has to do with the relative frequency of latin characters vs non-latin
characters, is my guess.

lang    after   before  change (- = more free space)
en_US   3132    2996    -134
fr      2136    2060    -76
ja      1916    1724    -232
ru      2196    2000    -196
2023-08-23 15:16:53 -05:00
Dan Halbert
e08ad22ef6
Merge pull request #8317 from jepler/merge-82x
Merge 8.2.x into main
2023-08-22 17:28:30 -04:00
c07fff574e
Merge pull request #8304 from ccattuto/main
Fixed compilation error when FF_MAX_SS != FF_MIN_SS
2023-08-22 09:47:40 -05:00
c029d6a165
Merge remote-tracking branch 'origin/8.2.x' into merge-82x 2023-08-22 08:49:16 -05:00
Dan Halbert
282e93d3e3
Merge pull request #8281 from dhalbert/merge-micropython-v1.19.1
Merge micropython v1.19.1
2023-08-21 19:24:26 -04:00
Ciro Cattuto
a5578cf067 Fixed compilion error when FF_MAX_SS != FF_MIN_SS 2023-08-21 22:47:09 +02:00
Dan Halbert
4593008317
Merge pull request #8297 from dhalbert/better-hard-fault-message
improve hard fault message
2023-08-20 12:16:33 -04:00
Radomir Dopieralski
3120bd3d7d Fix displayio when CIRCUITPY_REPL_LOGO is disabled
We have to make room for the status bar no matter if the logo is enabled
or not. We probably should add a similar option for disabling the status
bar.

This makes the PewPew M4 port stop crashing.

(cherry picked from commit b50a7fb913)
2023-08-20 00:59:34 +02:00
Radomir Dopieralski
b50a7fb913 Fix displayio when CIRCUITPY_REPL_LOGO is disabled
We have to make room for the status bar no matter if the logo is enabled
or not. We probably should add a similar option for disabling the status
bar.

This makes the PewPew M4 port stop crashing.
2023-08-20 00:21:33 +02:00
Dan Halbert
10a022db87 consolidate and shorten some error messages 2023-08-19 12:39:54 -04:00
Dan Halbert
7933bb0ebe improve hard fault message 2023-08-19 10:07:46 -04:00
49159efe55
Allow natmods to build again (they don't work, however) 2023-08-18 12:50:05 -05:00
Dan Halbert
d582407b06 pre-commit fixes 2023-08-14 00:59:22 -04:00
Dan Halbert
2171e67c1b merge latest adafruit/main 2023-08-13 19:43:54 -04:00
Dan Halbert
27c7807693 silabs build needs work; other builds are working 2023-08-13 19:05:16 -04:00
Dan Halbert
433059023d fix -j1 builds, particularly CPX 2023-08-12 16:49:03 -04:00
Dan Halbert
fe0e2f13bc wip; fix qstr processing 2023-08-10 20:06:32 -04:00
Dan Halbert
2ff8667e75 wip; remove long-lived functionality; remove PR#2614
Trinket M0 compile has no compilation errors, but has link errors to fix.
2023-08-08 20:41:17 -04:00
Scott Shawcroft
1629faf8b3
Make usb_host.Port a singleton
This allows you to initialize usb_host.Port once successfully and
then returns the same object as long as you pass the same arguments
in. It does allow you to fix incorrect pins but not switching from
one valid set to another. (It needs a reset for that.)

This also moves hcd cache operations to RAM so that they don't
access the cache when doing maintenance.
2023-07-18 10:40:54 -07:00
843ea86978
fix repeating cursor keys 2023-07-12 07:04:58 -05:00
1a06169e18
Implement key-repeat 2023-07-12 07:04:58 -05:00
910fcf1c93
usb host keyboard: add keymap support
This is confined to pure ASCII, but does support Alt Gr. This is enough
to make a French keyboard layout work:
 * home row is "qsdfghjklm"
 * numerals are all shifted
 * keys like {} require Alt Gr

While not tested, this should also support layouts like Colemak with
the necssary keymap file.

Layouts can be produced from Neradoc's keyboard layout modules on the
device & loaded at runtime. Code to do so is at
    https://gist.github.com/jepler/597c0a00e0eb014a433e03c0ae363a08
as well as a sketch of how an extended format could support dead keys &
the full Unicode BMP instead of just ASCII.
2023-07-12 07:04:56 -05:00
Scott Shawcroft
2686beab36
Basic USB host support and keyboard workflow
Connects up read, write and ctrl_transfer to TinyUSB. USB Host
support is available on iMX RT and RP2040.

Fixes #6527 (imx) and fixes #5986 (rp2).
2023-07-10 14:22:21 -07:00
d4913b04e0 rgbmatrix: update protomatter
and re-organize so that esp32 s2/s3 don't do as much at reset

.. it's not necessary (because most data is in esp-idf managed memory)
and doing this saves me from having to debug why reconstruct isn't working
properly on that platform.

This needs to be tested on other platforms again before being merged!
2023-06-08 10:43:32 -05:00
Ted Hess
9c45551880 Do not enable web_workflow background callbacks if wifi is not enabled/connected 2023-05-11 17:01:53 -04:00
Scott Shawcroft
a9dc31a881
Add additional iMX RT support
This adds a script to generate the peripherals files (except clock).

It adds support for the 1015, 1020, 1040, and 1050 EVKs.

Some work was started on 1176 but it isn't working. So, the board
def is in a separate branch.

Fixes #3521. Fixes #2477.
2023-04-28 11:01:13 -07:00
Dan Halbert
34f565dd89
Merge pull request #7891 from tannewt/fix_epd_uc
Add address_little_endian and fix display memory reuse
2023-04-26 00:27:59 -04:00
Ted Hess
ccbb6a58fb Fix web-editor debug on non-standard port using localhost (CORS) 2023-04-22 13:09:18 -04:00
Scott Shawcroft
7089ea4d65
Add address_little_endian for displayio
Add address_little_endian for epaper displays with little endian
(low byte first) addresses.

Also clears allocated display and display bus memory so it has a
known state. The acep member wasn't always set so it varied
accidentally.

Fixes #7560. May fix #7778. Fixes #5119.
2023-04-21 12:19:29 -07:00
Scott Shawcroft
66edcf5d03
Add PicoDVI support
PicoDVI in CP support 640x480 and 800x480 on Feather DVI, Pico and
Pico W. 1 and 2 bit grayscale are full resolution. 8 and 16 bit
color are half resolution.

Memory layout is modified to give the top most 4k of ram to the
second core. Its MPU is used to prevent flash access after startup.

The port saved word is moved to a watchdog scratch register so that
it doesn't get overwritten by other things in RAM.

Right align status bar and scroll area. This normally gives a few
pixels of padding on the left hand side and improves the odds it is
readable in a case. Fixes #7562

Fixes c stack checking. The length was correct but the top was being
set to the current stack pointer instead of the correct top.
Fixes #7643

This makes Bitmap subscr raise IndexError instead of ValueError
when the index arguments are wrong.
2023-04-19 15:14:02 -07:00
Scott Shawcroft
09c2c5ef0e
Merge pull request #7876 from thess/CORS-update
Simplify CORS checks and don't restrict host names.
2023-04-19 11:07:34 -07:00
Ted Hess
8980ebfa16 Simplify CORS checks and don't restrict host names.
Minor socket cleanup.
2023-04-18 22:09:48 -04:00
Ted Hess
27a97dec16 Static web pages:
- Move loading .js scripts from <head> to <body> for faster rendering
   - Enable back-button support for file system/editor navigation
   - Close WebSocket when navigating away from /cp/serial
   - Use better looking Blinka icon.
2023-04-16 15:53:07 -04:00
Scott Shawcroft
dbfe1e73cf
Merge pull request #7846 from isacben/device-name-for-web-workflow
Add device name environment variable for web workflow
2023-04-11 10:20:46 -07:00
Isaac Benitez
532283d1a5 Replace malloc() with static varible 2023-04-10 20:58:21 -07:00
Isaac Benitez
e38b5491f4 Add device name env variable for web workflow 2023-04-07 11:45:13 -07:00
Scott Shawcroft
097af804cd
Fix ticks
In #7497 port_background_task was renamed to port_background_tick
but the actual call site wasn't changed. This meant that it was
no longer called!

Rename more functions from task to tick to make it clearer which is
which.
2023-04-07 09:49:51 -07:00
Ted Hess
9825b7fbb7 Web Workflow sockets and threads handling improvements.
Fixes polling thread looping forever hangs preventing new connections.
Don't lose listening sockets on mp resets and re-init.
Keep better separation of "system" and "user" sockets.
Track socket states to prevent re-use of sockets before closed.
Close REST socket when transaction completes. No post-init.
Remove unnecessary state flags.
2023-04-05 13:50:42 -04:00
Ted Hess
1a5afd485b Allow web_workflow to startup after deep sleep alarm wakeup 2023-03-29 15:47:17 -04:00
df916e0484
Merge remote-tracking branch 'origin/main' into mimxrt10xx-rotaryio 2023-03-23 13:02:12 -05:00
d247e5c6c9
Add the ability for a port to gc things, collect pin change objects that way 2023-03-23 09:16:00 -05:00
hathach
8c1095b268
Merge branch 'main' into add-codespell 2023-03-23 14:09:57 +07:00
Scott Shawcroft
53b16615bc
Merge pull request #7767 from tannewt/imx_fixed_stack
Make set_stack_limit respect fixed stack
2023-03-22 09:56:33 -07:00