Commit Graph

427 Commits

Author SHA1 Message Date
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
Jeff Epler 774f6ac6ab
Switch to using MP_ERROR_TEXT instead of translate, globally 2023-10-30 09:49:06 +01: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
Scott Shawcroft 923a5b28ca
Add NO_FPS_LIMIT instead of magic numbers 2023-10-05 14:56:11 -07:00
Scott Shawcroft 8183d8ef50
Remove `displayio.*.show()`
Use `displayio.*.root_group =`.
2023-10-02 14:28:59 -07:00
Jeff Epler 409d1a83b6
displayio: fix releasing dot clock framebuffres in release_displays
this caused problems particularly when the framebuffer was not associated
with a display.
2023-09-25 09:45:35 -05:00
Jeff Epler ed9cacf41d
Add DotClockFramebuffer 2023-08-30 10:30:15 -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 fe0e2f13bc wip; fix qstr processing 2023-08-10 20:06:32 -04:00
Dan Halbert 0d2c3c3f08 wip: continuing compilation fixes; mp_obj_alloc everywhere 2023-08-07 20:45:57 -04:00
elpekenin a51be16d9e Fix typo, oopsie 2023-07-29 15:10:09 +02:00
elpekenin c4e915c3b2 Improve error message 2023-07-29 14:39:44 +02:00
foamyguy 96d3e662b3 refactor bitmap.blit into bitmaptools 2023-07-02 14:35:40 -05:00
foamyguy abf15125ff adding skip_self_index argument to bitmap.blit() 2023-07-01 11:50:24 -05:00
foamyguy 4bf4d148c1 always set rendered_hidden false when hidden changes 2023-06-16 18:05:39 -05:00
foamyguy 074c13488b revert whitespace change. handle hidden by parent 2023-06-16 16:57:37 -05:00
foamyguy 3222cdf847 revert indention change 2023-06-16 16:50:01 -05:00
foamyguy 0e3cdea51e remove prints 2023-06-16 16:47:24 -05:00
foamyguy 340506be58 revert unrelated epd change 2023-06-16 16:43:10 -05:00
foamyguy 18faeb86c7 more debug prints 2023-06-09 14:53:11 -05:00
foamyguy ec21dc6975 added debug prints 2023-06-08 12:01:39 -05:00
foamyguy 4712a9d301 remove old conditions 2023-05-31 21:00:02 -05:00
foamyguy f8948c2718 format 2023-05-31 20:58:04 -05:00
foamyguy 4ad54b2853 debugging prints. add rendered_hidden field to tilegrid 2023-05-31 20:57:17 -05:00
foamyguy 06057a63e6 don't consider refresh areas for hidden groups or tilegrids 2023-05-30 19:25:08 -05:00
Scott Shawcroft 75046b3a58
Save space with consolidated errors 2023-04-25 13:26:48 -07:00
Scott Shawcroft eab202aa53
Fix SH110x 2023-04-25 10:36:34 -07:00
Scott Shawcroft 87fc5eff26
Re-enable partial updates when available 2023-04-24 16:24:33 -07:00
Scott Shawcroft b16037859c
Fix native epd boards 2023-04-21 14:36:35 -07: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
foamyguy 8bf94d03e4 try to fix multi-display reset 2023-04-04 20:31:42 -05:00
foamyguy 60e12c5c1d only add circuitpython_splash to display if it's not already in another group 2023-04-03 15:43:29 -05:00
Dan Halbert db76fbd55f
Merge pull request #7712 from gamblor21/ondiskgif_freemem_fix
Add deinit to OnDiskGif
2023-03-23 09:03:07 -04:00
gamblor21 3020893ba2 Tweak to try to reduce low space builds 2023-03-22 19:20:20 -05:00
gamblor21 2c1e2061db Change free function 2023-03-22 19:20:20 -05:00
gamblor21 aa423cc1c6 Free memory allocated by bitmap obj 2023-03-22 19:20:20 -05:00
gamblor21 07e83674c9 Add deinit to displayio.Bitmap 2023-03-22 19:20:20 -05:00
Dan Halbert 05e783cbbd
Merge pull request #7775 from tannewt/fix_pyportal
Add more checks for read-only Bitmaps
2023-03-22 20:16:43 -04:00
Scott Shawcroft 16c8dad078
Fix Pallete cache for grayscale and tricolor epd 2023-03-22 11:54:43 -07:00
Scott Shawcroft a280c010c2
Fix tricolor epd and add EPD feather 2023-03-22 11:14:38 -07:00
Scott Shawcroft 36dbaf4ccc
Add more checks for read-only Bitmaps
Fixes #7768
2023-03-22 10:14:42 -07:00
Dan Halbert 859a48723f
Merge pull request #7633 from tannewt/fix_imx_pwm
Fix `pwmio` on iMX RT.
2023-02-28 14:11:06 -05:00
Dan Halbert f9831b3bbc
Merge pull request #7639 from adafruit/8.0.x
Merge 8.0.x up to main
2023-02-24 19:32:09 -05:00
Scott Shawcroft b79661d631
Alphabetize, fix typo and remove incorrect comment 2023-02-23 14:34:54 -08:00
Scott Shawcroft 1acf65ee22
Fix `pwmio` on iMX RT.
It now handles deinit, never_reset and sharing tracking. PWM
now runs in the WAIT state as well during a time.sleep().

_reset_ok() was removed because it was called in one spot right
before deinit().

Some PWMOut were also switched to a bitmap for use instead of
reference count. That way init and deinit are idempotent.

Fixes #6589. Fixes #4841. Fixes #4541.
2023-02-22 11:22:39 -08:00
Dan Halbert 3f66a0be83
Merge pull request #7611 from gamblor21/colorconverter-mem-fix
ColorConverter output colorspace non-initialization fix
2023-02-19 20:34:30 -05:00
gamblor21 e78875a93b ColorConverter output colorspace fix 2023-02-18 15:35:56 -06:00
Scott Shawcroft 931c7c1c51
Add Bangle.js 2, JDI memory displays and ACeP epd
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.)
2023-02-15 15:03:40 -08:00