Commit Graph

25 Commits

Author SHA1 Message Date
microDev a52eb88031
run code formatting script 2021-03-15 19:27:36 +05:30
Jeff Epler f61f8f999b EPaperDisplay: add rotation property
untested, because I don't want to mess my magtag demo up :) but it builds
2020-11-18 18:06:31 -06:00
Scott Shawcroft 78ccac930f
Add .busy property to EPaperDisplay 2020-11-13 18:57:52 -08:00
Scott Shawcroft 8d4296f964
Add board.DISPLAY to MagTag. Fix luma computation
* Initialize the EPaper display on the MagTag at start.
* Tweak the display send to take a const buffer.
* Correct Luma math
  * Multiply the blue component, not add.
  * Add all of the components together before dividing. This
    reduces the impact of truncated division.
2020-11-13 18:57:52 -08:00
Scott Shawcroft 0d1649880f
Add grayscale EInk support 2020-10-26 16:59:59 -07:00
Jeff Epler 774f2e16ba displayio, framebufferio: Remove spurious call to supervisor_start_terminal
A call to supervisor_start_terminal remained in
common_hal_displayio_display_construct and was copied to other display
_construct functions, even though it was also being done in
displayio_display_core_construct when that was factored out.

Originally, this was harmless, except it created an extra allocation.
When investigating #3482, I found that this bug became harmful,
especially for displays that were created in Python code, because it
caused a supervisor allocation to leak.

I believe that it is safe to merge #3482 after this PR is merged.
2020-10-11 21:09:08 -05:00
Mark Roberts 9f19a8a760
Ran pre-commit locally 2020-09-30 11:06:13 -07:00
Mark Roberts 06a3d15266 Mostly-working-version with comments 2020-09-24 22:07:33 -04:00
Mark Roberts 5536e574db Changes to compile cleanly 2020-09-21 22:08:16 -04:00
Jeff Epler af520729fe displayio, framebufferio: Enable supervisor tick when a display is auto-refresh
This is a step towards restoring the efficiency of the background
tasks
2020-07-15 09:26:47 -05:00
Scott Shawcroft b580b34cbf
Merge remote-tracking branch 'adafruit/master' into lower_power 2020-04-14 17:14:44 -07:00
Jeff Epler 09dc46a984 Add Protomatter and FramebufferDisplay 2020-04-14 18:24:54 -05:00
Scott Shawcroft 6f60afe8c5
First try at lowering the power consumption 2020-03-13 11:12:30 -07:00
Jeff Epler 95d9c49e43 Merge remote-tracking branch 'origin/master' into tick-refactor 2019-11-29 11:27:09 -06:00
Scott Shawcroft d32dc814d3
Fix ePaper so it works after a GC.
We weren't correctly collecting the start and stop sequences. As
a result, the GC would free the space and allocate other info
there.

Thanks to JacobT on Discord for the bug report!
2019-11-26 12:48:36 -08:00
Jeff Epler 7f744a2369 Supervisor: move most of systick to the supervisor
This code is shared by most parts, except where not all the #ifdefs
inside the tick function were present in all ports.  This mostly would
have broken gamepad tick support on non-samd ports.

The "ms32" and "ms64" variants of the tick functions are introduced
because there is no 64-bit atomic read.  Disabling interrupts avoids
a low probability bug where milliseconds could be off by ~49.5 days
once every ~49.5 days (2^32 ms).

Avoiding disabling interrupts when only the low 32 bits are needed is a minor
optimization.

Testing performed: on metro m4 express, USB still works and
time.monotonic_ns() still counts up
2019-11-18 11:01:23 -06:00
Hierophect de5691acf5 Add never_reset and reset to pin common hal, adjust files 2019-11-15 12:47:00 -05:00
Scott Shawcroft bea77c651a
Minor renames 2019-08-26 16:37:59 -07:00
Scott Shawcroft 7324b70a7c
Rework based on Dan's review 2019-08-23 15:27:21 -07:00
Scott Shawcroft 8d836fa248
Regular display fixes including refresh tweaks 2019-08-22 14:25:46 -07:00
Scott Shawcroft f2a1972ba8
Add refresh_time to use if busy_pin is not given 2019-08-22 14:23:33 -07:00
Scott Shawcroft 24b30965c4
Refresh ePaper displays once code.py is done running 2019-08-22 14:23:32 -07:00
Scott Shawcroft 36a23e0fe3
Rework refresh API and factor common display stuff out
NOT TESTED! Just compiles

Fixes #1691
2019-08-22 14:23:27 -07:00
Scott Shawcroft c247e7df9c
Begin refresh rework. 2019-08-22 14:08:33 -07:00
Scott Shawcroft 70680d5b22
EPaper displays work mostly. 2019-08-22 14:08:33 -07:00