Commit Graph

581 Commits

Author SHA1 Message Date
Lucian Copeland e504438fd2 Remove unlicensed file, fix reset pin type check 2020-09-14 11:58:13 -04:00
Lucian Copeland ecc219fe50 Merge remote-tracking branch 'upstream/main' into esp32-displayio-fix 2020-09-14 10:44:31 -04:00
Scott Shawcroft 7611e71a1b
Merge pull request #3374 from kmatch98/shape_update
Add dirty rectangle tracking to Shape display element
2020-09-11 12:47:54 -07:00
Scott Shawcroft 01daf5b8ce
Merge pull request #3378 from DavePutz/issue3266
Fix for #3266: ensure SPI lock is free after a soft reboot
2020-09-11 12:41:06 -07:00
root 870326b221 Moved SPI unlock code 2020-09-11 10:54:46 -05:00
Kevin Matocha 37e85aebd2 Fix off-by-one error, simplify the logic, add comments 2020-09-10 21:34:03 -05:00
Scott Shawcroft 9256e6b376
Merge pull request #3302 from xiongyihui/main
support to get HID OUT report
2020-09-10 17:35:04 -07:00
Lucian Copeland f95ad7b27c Fix reset pin null reference, construct error null reference 2020-09-10 15:37:43 -04:00
root 59165cabbe Removed unneeded pointer 2020-09-09 10:36:55 -05:00
root 61e1c906bf Merge branch 'issue3266' of https://github.com/DavePutz/circuitpython into issue3266 2020-09-09 09:34:55 -05:00
root 24a18c63f9 Moved SPI unlock to reset_board_busses() 2020-09-09 09:32:25 -05:00
Kevin Matocha d600759bc8 Utilize MIN and MAX functions from py/misc.h 2020-09-08 20:02:34 -05:00
DavePutz 918a4733b4
Merge pull request #25 from DavePutz/main
update from main
2020-09-07 10:14:36 -05:00
root 8d27533cd4 Make sure SPI lock is free initially 2020-09-06 18:03:25 -05:00
Kevin Matocha 297b7195b0 Delete unnecessary comment 2020-09-04 22:03:57 -05:00
Kevin Matocha 95db456a7e Add final newline 2020-09-04 14:23:53 -05:00
Kevin Matocha 9edad9ea85 Delete trailing blank lines from Shape.c 2020-09-04 14:21:49 -05:00
Kevin Matocha f7714649ee Add dirty rectangle tracking to Shape display element 2020-09-04 14:15:15 -05:00
Scott Shawcroft 96cf60fbbd
Merge remote-tracking branch 'adafruit/main' into native_wifi 2020-09-03 16:34:56 -07:00
Scott Shawcroft 0b94638aeb
Changes based on Dan's feedback 2020-09-03 16:32:12 -07:00
Scott Shawcroft 5d17d6402d
Merge pull request #3366 from kmatch98/refresh_now
Update refresh to force immediate redraw with `display.refresh()`
2020-09-02 16:37:46 -07:00
Scott Shawcroft 786f4ed114
Merge pull request #3344 from jepler/issue-3184
Fix RGBMatrix, FrameBufferDisplay bugs
2020-09-02 15:32:30 -07:00
Jeff Epler 17a5a85528 rgbmatrix: Move struct definition to shared-module, rename 'core' member 2020-09-02 13:34:16 -05:00
Jeff Epler 3c083330f8 RGBMatrix: Remove unused, dead allocation
@tannewt noticed this in a pull request review.  The allocated
memory was never used, but the GC would have collected it eventually.
2020-09-01 11:00:22 -05:00
Jeff Epler 71c63c2812 FramebufferDisplay: Don't set rotation via core_construct
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-09-01 11:00:22 -05:00
Jeff Epler ce603dfebf rgbmatrix: Disable timer while reconstructing the display 2020-09-01 11:00:22 -05:00
Jeff Epler dfa90cc11d allocator.h: add a missing license notice 2020-09-01 11:00:19 -05:00
Jeff Epler e01ade3848 rgbmatrix: Don't inline the allocator functions 2020-09-01 11:00:07 -05:00
Jeff Epler 2f120c70ee rgbmatrix: recover gracefully from allocation errors
e.g., allocating a 192x32x6bpp matrix would be enough to trigger this
reliably on a Metro M4 Express using the "memory hogging" layout.
Allocating 64x32x6bpp could trigger it, but somewhat unreliably.

There are several things going on here:
 * we make the failing call with interrupts off
 * we were throwing an exception with interrupts off
 * protomatter failed badly in _PM_free when it was partially-initialized

Incorporate the fix from protomatter, switch to a non-throwing malloc
variant, and ensure that interrupts get turned back on.

This decreases the quality of the MemoryError (it cannot report the size
of the failed allocation) but allows CircuitPython to survive, rather
than faulting.
2020-09-01 10:55:45 -05:00
Kevin Matocha fc513956be Update refresh to force immediate redraw with display.refresh() or display.refresh(target_frames_per_second=None), even with auto_refresh=False 2020-09-01 09:36:29 -05:00
Dan Halbert 6dbd369272 merge from upstream 2020-08-30 14:39:03 -04:00
Scott Shawcroft 8b71e26abd
Merge remote-tracking branch 'adafruit/main' into native_wifi 2020-08-25 16:39:23 -07:00
Scott Shawcroft 1527a3ce92
Merge remote-tracking branch 'adafruit/main' into add_pwmio 2020-08-24 18:25:18 -07:00
Kevin Matocha 983e1af33d remove other extraneous files 2020-08-21 19:10:13 -05:00
Kevin Matocha dc502a5f26 remove extraneous files 2020-08-21 19:08:25 -05:00
Kevin Matocha a9f6d147c4 Merge adafruit/main latest 2020-08-21 14:37:32 -05:00
Kevin Matocha 7e529ed4c5 Merge with latest adafruit/main 2020-08-21 14:28:24 -05:00
Kevin Matocha 3753ea3cd8 Merge remote-tracking branch 'source/main' into main 2020-08-21 14:19:58 -05:00
Kevin Matocha 24ca133396 Updating main to adafruit/main 2020-08-21 14:19:28 -05:00
Scott Shawcroft 5771be9510
Merge pull request #3292 from jepler/allocate_display_bus_bug
allocate_display_bus: fix bug where in-use bus would be returned
2020-08-21 11:19:50 -07:00
Dan Halbert 0e30dd8bcc merge from upstream; working; includes debug_out code for debugging via Saleae for posterity 2020-08-20 20:29:57 -04:00
Scott Shawcroft 7bdd243bf6
Ping works! 2020-08-19 14:22:13 -07:00
Scott Shawcroft 3860991111
Ping work and start to add socketpool 2020-08-19 14:22:13 -07:00
Scott Shawcroft c62ab6e09a
Add ipaddress 2020-08-19 14:22:12 -07:00
Yihui Xiong 8bab7b664c support to get HID OUT report 2020-08-19 20:18:17 +08:00
Scott Shawcroft 6857f98426
Split pulseio.PWMOut into pwmio
This gives us better granularity when implementing new ports because
PWMOut is commonly implemented before PulseIn and PulseOut.

Fixes #3211
2020-08-18 13:08:33 -07:00
Scott Shawcroft 33c9bdb778
Merge pull request #3277 from jepler/sharpmemory-bugs
sharpdisplay: Prevent 'ValueError: <pin> in use' exception
2020-08-18 11:54:53 -07:00
Jeff Epler f2f18da189 Fix build error for !SHARPDISPLAY 2020-08-18 10:59:55 -05:00
Jeff Epler 9e66f71a31 Fix build error for \!DISPLAY 2020-08-18 10:03:45 -05:00
Jeff Epler 0bec39118f displayio: Don't need to specialcase reset of sharpdisplay framebuffer
.. for the case where the bus was not in use
2020-08-18 09:32:28 -05:00