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.
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.
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!
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.
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.
- 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.
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.
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.
* Enable dcache for OCRAM where the VM heap lives.
* Add CIRCUITPY_SWO_TRACE for pushing program counters out over the
SWO pin via the ITM module in the CPU. Exempt some functions from
instrumentation to reduce traffic and allow inlining.
* Place more functions in ITCM to handle errors using code in RAM-only
and speed up CP.
* Use SET and CLEAR registers for digitalio. The SDK does read, mask
and write.
* Switch to 2MiB reserved for CircuitPython code. Up from 1MiB.
* Run USB interrupts during flash erase and write.
* Allow storage writes from CP if the USB drive is disabled.
* Get perf bench tests running on CircuitPython and increase timeouts
so it works when instrumentation is active.
This 2-in-1 PR started with the goal of support the Bangle.js 2
smartwatch with *no USB*.
* Adds "secure" DFU build support with a committed private key.
* Adds 3-bit color support with one dummy bit for the JDI memory display
* Allows nrf boards to have a board_background_task() run in RUN_BACKGROUND_TASK.
This is needed because the Bangle.js 2 uses the watchdog to reset.
* Renamed port_background_task() to port_background_tick() to indicate it
runs on tick, not RUN_BACKGROUND_TASK.
* Marks serial connected when the display terminal is inited. This means
that safe mode messages show up on the display.
ACep, 7-color epaper displays also pack 3 bits in 4. So, I added that
support as well.
* Adds 3-bit ACeP color support for 7-color e-paper displays. (Not
watch related but similar due to color depth.)
* Allows a refresh sequence instead of a single int command. The 7" ACeP
display requires a data byte for refresh.
* Adds optional delay after resetting the display. The ACeP displays
need this. (Probably to load LUTs from flash.)
* Adds a cleaning phase for ACeP displays before the real refresh.
For both:
* Add dither support to Palette.
* Palette no longer converts colors when set. Instead, it caches
converted colors at each index.
* ColorConverter now caches the last converted color. It should make
conversions faster for repeated colors (not dithering.)
* write any partial message
* instead of "..." show a sensible (translatable) message
This does slightly lower the amount of data that can be printed,
and makes the exact amount dependent on the language. However, if boot.py
intentionally needs to produce larger amounts of output, it can
deliberately mount the filesystem in RW mode and perform any writes needed.
In that case it's up to the boot.py to choose an appropriate way to
limit the number of writes if needed for the application.
Now, open wifi works on Pico W, so this closes#7438.
For the web workflow it's now OK to either
* specify an empty password string (as before)
* not have the CIRCUITPY_WIFI_PASSWORD key at all (new functionality)
This may help address #7409 if the underlying cause is the deterministic
volume ID. However, not all boards have working urandom (samd21
at least does not) so a couple of fallbacks are attempted when it fails.
I verified that on a pico_w, each `storage.erase_filesystem()` gives
a distinct 32-bit volume ID (pico_w's urandom can never fail)
* Set nonblock on all accepted sockets. Not just ones for user code.
* Close an open websocket if another is accepted.
* Set debug level to INFO rather than DEBUG because DEBUG crashes
on ESP32-S3 USB OTG.
When the USB serial buffer is full, the Ctrl-C code to send
KeyboardInterrupt can't be sent, which creates a problem if you've
pasted code or otherwise filled the buffer and need to recover.
A similar problem affects advanced UIs that interact with CircuitPython
and may send characters when they're unexpected, such as mu when it
tries to move the cursor based on the user clicking on the screen.
The main way forward seems to be to use some kind of message that can
still reach CircuitPython when its internal serial recieve buffer is full.
RS232 defines a "break" signal, in which the transmitting device holds its
data line in the "space" state for many entire character times. This still
exists in the world of USB serial.
This does work, sort of, except that your host computer software will need
to properly handle blocking serial writes; tio can send a break with
the **ctrl-c b** sequence, but this only works if it hasn't yet written
too much data, so it doesn't actually help in most situations :-/
It doesn't need never reset because the status LED is only active
when user code isn't.
This also fixes PWM never reset on espressif so that deinit will
undo it.
Fixes#6223