Commit Graph

29 Commits

Author SHA1 Message Date
Taku Fukada d356581651 Fix several type hints 2020-07-27 18:05:13 +09:00
dherrada d0d949cd24 Made every init return None 2020-07-03 14:23:34 -04:00
dherrada 783cc4de39 Added type hints to displayio 2020-07-03 10:05:14 -04:00
dherrada 54cb1feea0 Removed all 'self, )' 2020-07-02 13:28:36 -04:00
Scott Shawcroft 4e8de3c554
Swap sphinx to autoapi and the inline stubs 2020-05-12 17:28:24 -07:00
dherrada 2ebe3035df
Did board, digitalio, displayio 2020-05-07 10:54:09 -04:00
Jeff Epler 507e17fbf1 displayio: Fix "bus type" problem introduced at 8cba145c90
When allocate_display_bus_or_raise was factored out, the assignment
of the bus's Python type was lost.  Restore it.

This would have affected displays of any type other than RGBMatrix, when
they were created dynamically.  Boards with displays configured in flash
were unaffected.

Closes: #2792
2020-04-21 13:48:34 -05:00
Jeff Epler 8cba145c90 displayio: implement, use allocate_new_display_bus_or_raise 2020-04-14 18:24:54 -05:00
Scott Shawcroft a870908718
Don't break the function signature 2020-03-26 14:11:20 -07:00
Scott Shawcroft 6b7acc65b6
Add polarity and phase to FourWire.
It was fixed as 0/0 even though it used to get it from the current
SPI state. This makes it more explicit with kwargs.

Thanks to magpie_lark and kmatocha on the Adafruit Support forum
for finding the issue: https://forums.adafruit.com/viewtopic.php?f=60&t=162515
2020-03-25 11:22:46 -07:00
Dan Halbert 817b5be320 rename routines to be clearer; fix wiznet arg types 2020-03-05 16:35:31 -05:00
Dan Halbert 8435935429 update uses of assert_pin_free; remove redundant checks 2020-02-29 15:37:32 -05:00
Scott Shawcroft 7324b70a7c
Rework based on Dan's review 2019-08-23 15:27:21 -07:00
Scott Shawcroft 3a98de1236
Add reset() to display busses to detect whether it works 2019-08-22 14:23:33 -07:00
Scott Shawcroft 70680d5b22
EPaper displays work mostly. 2019-08-22 14:08:33 -07:00
Jeff Epler 32a6d36405 shared-bindings: Use RUN_BACKGROUND_TASKS 2019-08-11 08:53:02 -05:00
Scott Shawcroft 4013bcde9e
Add baudrate to FourWire and shorten delay. 2019-06-17 17:48:05 -07:00
Scott Shawcroft afbf59019e
Update displayio docs to add detail to display bus comments
Fixes #1599
2019-03-12 17:18:33 -07:00
Dan Halbert c854f6617a check display-bus transaction status and act accordingly 2019-03-06 13:45:48 -05:00
Scott Shawcroft c17f147be9
A variety of displayio improvements
This changes a number of things in displayio:
* Introduces BuiltinFont and Glyph so the built in font can be used by libraries. For boards with
  a font it is available as board.TERMINAL_FONT. Fixes #1172
* Remove _load_row from Bitmap in favor of bitmap[] access. Index can be x/y tuple or overall index. Fixes #1191
* Add width and height properties to Bitmap.
* Add insert and [] access to Group. Fixes #1518
* Add index param to pop on Group.
* Terminal no longer takes unicode character info. It takes a BuiltinFont instead.
* Fix Terminal's handling of [###D vt100 commands used when up arrowing into repl history.
* Add x and y positions to Group plus scale as well.
* Add bitmap accessor for BuiltinFont
2019-02-11 20:55:05 -08:00
Scott Shawcroft 448ae64d8e
Add support for display rotation and raw commands
Display rotation is relative to the scan order of the display.
The scan order can be found by scrolling the display with command
0x37 `display_bus.send(0x37, struct.pack(">H", i % 128))`

Fixes #1504
2019-02-01 00:32:03 -08:00
Scott Shawcroft ec03887040
Fix hallowing and nrf builds 2019-01-31 11:42:15 -08:00
Scott Shawcroft edc8383e22
Improvements thanks to danh's review 2019-01-18 16:37:06 -08:00
Scott Shawcroft dc024cf411
Add a bit more to the docs 2019-01-18 12:59:23 -08:00
Scott Shawcroft 6404aaf411
Fix up nrf and using board.SPI in FourWire 2019-01-17 18:19:07 -08:00
Scott Shawcroft 84292ad890
External fourwire works and blinka splash after 2019-01-17 00:20:16 -08:00
Scott Shawcroft 05d8885a1a
Rework displays in prep for dynamic support and 8bit parallel. 2019-01-16 12:05:20 -08:00
Scott Shawcroft 747f2cfe26
Add subclass support to displayio.
Also, swap make_news to accept a kwarg map and refine param checking.

Fixes #1237
2019-01-14 17:29:19 -08:00
Scott Shawcroft 6697544cdf
Introduce displayio to render graphics to displays.
It's designed to minimize RAM footprint by using Sprites to
represent objects on the screen. The object model also facilitates
partial screen updating which reduces the bandwidth needed to display.

This is all handled in C. Python simply manipulates the objects with
the ability to synchronize to frame timing.
2018-08-31 12:31:52 -07:00