summaryrefslogtreecommitdiff
path: root/shared-module/framebufferio
AgeCommit message (Collapse)Author
2021-03-15run code formatting scriptmicroDev
2020-10-15displayio: further ensure just one start_terminal callJeff Epler
@cwalther determined that for boards with 2 displays (monster m4sk), start_terminal would be called for each one, leaking supervisor heap entries. Determine, by comparing addresses, whether the display being acted on is the first display (number zero) and do (or do not) call start_terminal. stop_terminal can safely be called multiple times, so there's no need to guard against calling it more than once. Slight behavioral change: The terminal size would follow the displays[0] size, not the displays[1] size
2020-10-11displayio, framebufferio: Remove spurious call to supervisor_start_terminalJeff Epler
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-09-01FramebufferDisplay: Don't set rotation via core_constructJeff Epler
The expectations of displayio.Display and frambufferio.FramebufferDisplay are different when it comes to rotation. In displayio.Display, if you call core_construct with a WxH = 64x32 and rotation=90, you get something that is 32 pixels wide and 64 pixels tall in the LCD's coordinate system. This is fine, as the existing definitions were written to work like this. With framebuffer displays, however, the underlying framebuffer (such as RGBMatrix) says "I am WxH pixels wide in my coordinate system" and the constructor is given a rotation; when the rotation indicates a transpose that means "exchange rows and columns, so that to the Groups displayed on it, there is an effectively HxW pixel region for use". Happily, we already have a set_rotation method. Thus (modulo the time spent debugging things anyway:) the fix is simple: Always request no rotation from core_construct, then immediately fix up the rotation to match what was requested. Testing performed: 32x16 RGBMatrix on Metro M4 Express (but using the Airlift firmware, as this is the configuration the error was reported on): * initially construct display at 0, 90, 180, 270 degrees * later change angle to 0, 90, 180, 270 degrees * no garbled display * no safe mode crashes
2020-08-18Split pulseio.PWMOut into pwmioScott Shawcroft
This gives us better granularity when implementing new ports because PWMOut is commonly implemented before PulseIn and PulseOut. Fixes #3211
2020-08-12Update shared-module/framebufferio/FramebufferDisplay.hJeff Epler
Co-authored-by: Scott Shawcroft <scott@tannewt.org>
2020-08-12sharpmemory: Implement support for Sharp Memory Displays in framebufferioJeff Epler
2020-08-12framebufferio: add dirty row trackingJeff Epler
2020-08-12framebufferio: Add getters for remaining displayio_display_core_construct ↵Jeff Epler
arguments .. and introduce a convenience macro that helps many of them be required (if their values match defaults or are inapplicable)
2020-08-12framebufferio: Check early if framebuffer is big enoughJeff Epler
2020-08-12framebufferio: add "first pixel offset" and "row stride"Jeff Epler
2020-08-12framebufferio: handle sharp memory displaysJeff Epler
A bit of cheating; we need to add a protocol getter for reverse_bytes_in_word
2020-08-12framebufferio: Handle 1 (tested), 2, and 4 bpp displaysJeff Epler
2020-08-12framebufferio: Set type to none when releasingJeff Epler
This avoids the message "Too many displays in use" when they are released directly, rather than via release_displays().
2020-08-12framebufferio: Don't call swapbuffers unnecessarilyJeff Epler
2020-08-12framebufferio: Fix crash calling unimplemented get_brightnessJeff Epler
If set_brightness was implemented but get_brightness wasn't, this would hard fault
2020-07-20framebufferio: Handle auto refresh flag at resetJeff Epler
if we don't set the flag via accessor fn the tick enable might become wrong
2020-07-15displayio, framebufferio: Enable supervisor tick when a display is auto-refreshJeff Epler
This is a step towards restoring the efficiency of the background tasks
2020-06-03Fix up end of file and trailing whitespace.Diego Elio Pettenò
This can be enforced by pre-commit, but correct it separately to make it easier to review.
2020-04-20Merge remote-tracking branch 'adafruit/master' into lower_powerScott Shawcroft
This isn't perfect and needs a bit more testing.
2020-04-17framebufferio: update copyright informationJeff Epler
2020-04-17framebufferio: get width, etc., from protocol, not object propertyJeff Epler
2020-04-16Remove tick.h from merged file.Scott Shawcroft
2020-04-14framebufferio: move backlight down to the underlying framebufferJeff Epler
2020-04-14FramebufferDisplay: remove probably not needed constructor argumentsJeff Epler
2020-04-14Add Protomatter and FramebufferDisplayJeff Epler