Description
Work in Progress :: Rewrite of Adafruit_Blinka_Displayio from CircuitPython core
Repository/Branch: https://github.com/lesamouraipourpre/Adafruit_Blinka_Displayio/tree/display-core
Inception
This work started with the intent of translating display_core.c
from CircuitPython core to Blinka to be used as the superclass of Display
and EPaperDisplay
. Without realising it, it quickly escalated into doing a full re-translation of core displayio
to Blinka.
Goals
- Phase 1
- Expose the same API as is exposed from core
displayio
in CircuitPython 7. Done, only partially tested - If the API in Blinka is not the same as the API in CircuitPython core, the API in the core takes precedence. Do not care about breaking changes in Blinka DisplayIO. Done
- To translate
vectorio
as part ofdisplayio
. Done, only partially tested - To translate
bitmaptools
as part ofdisplayio
. Done, not tested
- Expose the same API as is exposed from core
- Phase 2 Testing. Testing. And lots more testing.
- Phase 3 Decide how best to speed up the code, by further translating some of it to use
numpy
and maybePIL/Pillow
Open issues on Blinka DisplayIO
- Add ePaper Display Support : theoretically implemented; testing has failed so far.
- Finish Shapes Support : implemented, and tested. I can find very little example code. Example used from displayio.Shape does not change after calling set_boundary() again circuitpython#3201
- Add ParallelBus Support : the relocation to
paralleldisplay
has been implemented. However, all methods on (Blinka's) ParallelBus currently raise aNotImplementedError
. This is unlikely to change in the near-term. - Implement Dirty Rectangle Tracking : implemented. More testing needed.
- Finish ColorConverter : implemented. More testing needed
- Add Terminalio Support : implemented. Currently only stdout is displayed on the screen, NOT stderr. Lots and lots of testing needed.
- Add Unicode character support to fontio module : not implemented. This should be achievable, but I've not attempted it yet.
- Display warning for zero width/height bitmap : will need to be re-tested.
- Remove thread enabling/disabling for autorefresh : may be fixed. The current implementation doesn't attempt to stop the thread. If the
auto_refresh
property isFalse
, it sleeps and checks for it beingTrue
periodically. - Add SH1107 display support : implemented from the core. Working. More testing needed.
- Much slower pitft touchscreen performance when using displayio : not tested, but it is extremely likely that this will be even slower for now.
- Update OnDiskBitmap to match core : implemented. Tested.
- remove the max_size parameter from displayio.Group : implemented. I'm assuming it will be weeks or even months before this branch gets merged.
Testing
ST7735R (Color SPI) - Working correctly
0.96" SPI Colour LCD (160x80) from Pimoroni. (Driver ST7735S - using Adafruit_CircuitPython_ST7735R library)
SH1107 (B&W I2C) - Working correctly
1.12" Mono OLED (128x128, white/black) Breakout – I2C from Pimoroni. (Driver SH1107 - using Adafruit_CircuitPython_DisplayIO_SH1107)
SSD1608 / SSD1680 (eInk SPI) - Not working, not sure why
Inky pHAT Black&White - (SSD1608)
Inky pHAT Yellow/Black/White - (Documented as SSD1608 which is only a B&W eInk controller, I'm assuming it is a SSD1680)
WHAT NOW?
If you have any hardware running Blinka and an available display to test with, please test the branch below and report:
https://github.com/lesamouraipourpre/Adafruit_Blinka_Displayio/tree/display-core
Please report any successes or failures as an issue on my repository NOT on adafruit/Adafruit_Blinka_Displayio
https://github.com/lesamouraipourpre/Adafruit_Blinka_Displayio/issues
Note: It is Pure Python, so it WILL BE SLOW. Conversion of parts to NumPy (or alternative) will follow if testing is successful.
I'll try to update the Wiki on my repo as progress is made:
https://github.com/lesamouraipourpre/Adafruit_Blinka_Displayio/wiki