summaryrefslogtreecommitdiff
path: root/shared-module
AgeCommit message (Collapse)Author
2021-01-12Merge remote-tracking branch 'origin/main' into audioout-esp32Jeff Epler
2021-01-05Merge branch 'main' into msgpackiot49
2021-01-05Merge branch 'msgpack' of github.com:iot49/iotpython into msgpackBernhard Boser
2020-12-29esp32s2: add I2SOutJeff Epler
2020-12-28update common_hal_reset_pin()microDev
2020-12-21Merge pull request #3834 from jepler/pr3723Scott Shawcroft
displayio: Fix several bugs (transparency and palettes of OnDiskBitmaps)
2020-12-19speedup pack_bin, ext, str; catch short readsBernhard Boser
2020-12-18adafruit_bus_device: Don't transmit STOP condition in write_then_readintoJeff Epler
Closes #3795
2020-12-17OnDiskBitmap: Correct handling of "0 color palette" imagesJeff Epler
Microsoft documentation says: > If biCompression equals BI_RGB and the bitmap uses 8 bpp or less, the bitmap has a color table immediatelly following the BITMAPINFOHEADER structure. The color table consists of an array of RGBQUAD values. The size of the array is given by the biClrUsed member. If biClrUsed is zero, the array contains the maximum number of colors for the given bitdepth; that is, 2^biBitCount colors. Formerly, we treated 0 colors as "no image palette" during construction, but then during common_hal_displayio_ondiskbitmap_get_pixel indexed into the palette anyway. This could have unpredictable results. On a pygamer, it gave an image that was blue and black. On magtag, it gave a crash.
2020-12-16displayio: ColorConverter: fix logic errors about transparent pixelsJeff Epler
The transparent_color field was never initialized. I _think_ this means its value was always set to 0, or the blackest of blacks. Instead, initialize it to the sentinel value, newly given the name NO_TRANSPARENT_COLOR. This exposed a second problem: The test for whether there was an existing transparent color was wrong (backwards). I am guessing that this was not found due to the first bug; since the converter had a transparent color, the correct test would have led to always getting the error "Only one color can be transparent at a time". Closes #3723
2020-12-11Merge branch 'main' into msgpackScott Shawcroft
2020-12-07add ExtType, update doc, add a testBernhard Boser
2020-12-02Merge pull request #3612 from gamblor21/bus_deviceScott Shawcroft
Moving Adafruit_CircuitPython_BusDevice to core
2020-12-02Merge remote-tracking branch 'adafruit/main' into msgpackScott Shawcroft
2020-12-02Merge pull request #3767 from dhalbert/sleepScott Shawcroft
Initial alarm and sleep PR: time alarms with light and deep sleep; PinAlarms not yet implemented
2020-12-01rename read, write to read_bytes, write_bytesBernhard Boser
2020-12-01disable on boards tight on memory. add stddef.h to imports (not actually ↵Bernhard Boser
needed).
2020-12-01fixed res may not be initialized in read_sizeBernhard Boser
2020-12-01cleanupBernhard Boser
2020-12-01output little endian; update exampleBernhard Boser
2020-12-01removed blanks line at end of fileBernhard Boser
2020-12-01moved logic to shared-module and added documentationBernhard Boser
2020-12-01Merge branch 'main' into bus_deviceMark
2020-11-28Fix align32_size().Christian Walther
It not only caused crashes with requests larger than 64K (can happen with RGBMatrix), but also generated a lot longer code than necessary.
2020-11-28Use movable allocation system for RGBMatrix allocations.Christian Walther
Hybrid allocation is now part of the infrastructure. Moving memory contents would not be necessary because displayio can recreate them, but does not hurt.
2020-11-28Use movable allocation system for Sharp display framebuffer.Christian Walther
Hybrid allocation is now part of the infrastructure. Moving memory contents would not be necessary because displayio can recreate them, but does not hurt.
2020-11-28Add movable allocation system.Christian Walther
This allows calls to `allocate_memory()` while the VM is running, it will then allocate from the GC heap (unless there is a suitable hole among the supervisor allocations), and when the VM exits and the GC heap is freed, the allocation will be moved to the bottom of the former GC heap and transformed into a proper supervisor allocation. Existing movable allocations will also be moved to defragment the supervisor heap and ensure that the next VM run gets as much memory as possible for the GC heap. By itself this breaks terminalio because it violates the assumption that supervisor_display_move_memory() still has access to an undisturbed heap to copy the tilegrid from. It will work in many cases, but if you're unlucky you will get garbled terminal contents after exiting from the vm run that created the display. This will be fixed in the following commit, which is separate to simplify review.
2020-11-27merge from upstreamDan Halbert
2020-11-25merge from upstream + wipDan Halbert
2020-11-24Fix opcode typo in VertexFormat()James Bowman
2020-11-23Merge pull request #3718 from jepler/epd-rotationScott Shawcroft
EPaperDisplay: add rotation property
2020-11-18Fix Palette grayscale for EInk.Scott Shawcroft
It needs to do the bitmasking that was only added to ColorConverter in #3611
2020-11-18EPaperDisplay: add rotation propertyJeff Epler
untested, because I don't want to mess my magtag demo up :) but it builds
2020-11-13Add .busy property to EPaperDisplayScott Shawcroft
2020-11-13Add board.DISPLAY to MagTag. Fix luma computationScott Shawcroft
* 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-11Add abort check in I2C lockgamblor21
2020-11-09use full_change instead of movedfoamyguy
2020-11-08set moved true when unhiding tilegridfoamyguy
2020-11-03Renamed to adafruit_bus_devicegamblor21
2020-11-01Fixes from testing SPIgamblor21
2020-10-31Initial SPI commitgamblor21
2020-10-31Merge pull request #3627 from adafruit/6.0.xDan Halbert
Merge 6.0.x bugfixes to main
2020-10-29Fixing review commentsgamblor21
2020-10-27Fixed whitespace issuesgamblor21
2020-10-26Add grayscale EInk supportScott Shawcroft
2020-10-26Added doc and translationsgamblor21
2020-10-26Fix lost board.SPI and board.I2C after explicitly deiniting them.Christian Walther
After calling board.SPI().deinit(), calling board.SPI() again would return the unusable deinited object and there was no way of getting it back into an initialized state until the end of the session.
2020-10-26Fix lost board.SPI and board.I2C after being used by display.Christian Walther
Fixes #3581. Pins were marked as never_reset by common_hal_displayio_fourwire_construct() and common_hal_sharpdisplay_framebuffer_construct(), but these marks were never removed, so at the end of a session after displayio.release_displays(), {spi|i2c}_singleton would be set to NULL but the pins would not be reset. In the next session, board.SPI() and board.I2C() were unable to reconstruct the object because the pins were still in use. For symmetry with creation of the singleton, add deinitialization before setting it to NULL in reset_board_busses(). This makes the pins resettable, so that reset_port(), moved behind it, then resets them.
2020-10-26Fix erroneous claim of board.I2C() by deinited display.Christian Walther
At the end of a session that called displayio.release_displays() (and did not initialize a new display), a board.I2C() bus that was previously used by a display would wrongly be considered still in use. While I can’t think of any unrecoverable problem this would cause in the next session, it violates the assumption that a soft reboot resets everything not needed by displays, potentially leading to confusion. By itself, this change does not fix the problem yet - rather, it introduces the same issue as in #3581 for SPI. This needs to be solved in the same way for I2C and SPI.
2020-10-25Added __probe_for_devicegamblor21