Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
30774da
EPaperDisplay: allow update_refresh_mode to change refresh_sequence
mikeysklar Oct 29, 2026
412d4a1
epaperdisplay: add write_previous_ram_command
mikeysklar Oct 29, 2026
96ac949
epaperdisplay: add keep_awake to skip reset and sleep between refreshes
mikeysklar Oct 29, 2026
d774bbe
epaperdisplay: add lag_frames drive
mikeysklar Nov 1, 2026
68d8587
epaperdisplay: add clean() for balanced wipes with lag drive
mikeysklar Nov 1, 2026
c544326
displayio: raise before releasing a lag display whose bus stays held
mikeysklar Nov 1, 2026
66578b2
epaperdisplay: try one reset when shutdown finds BUSY stuck
mikeysklar Nov 1, 2026
550d9d9
epaperdisplay: add CIRCUITPY_EPAPERDISPLAY_FAST, off on atmel-samd
mikeysklar Nov 2, 2026
d67afe7
Update circuitpython.pot after merging video-gif
mikeysklar Nov 3, 2026
35edbc8
Warn that fast e-paper updates exceed panel limits
mikeysklar Nov 3, 2026
0eebc93
epaperdisplay: explain how lag drive relates to FAST
mikeysklar Nov 4, 2026
cce6090
epaperdisplay: same API on every build
mikeysklar Nov 4, 2026
ef990ec
epaperdisplay: fast updates on only for espressif and raspberrypi
mikeysklar Nov 4, 2026
af6334e
epaperdisplay: lag drive on for espressif and raspberrypi
mikeysklar Nov 4, 2026
4c2e227
epaperdisplay: explain why lag drive stays balanced
mikeysklar Nov 4, 2026
84230df
epaperdisplay: fold lag drive into CIRCUITPY_EPAPERDISPLAY_FAST
mikeysklar Nov 5, 2026
ef18e31
epaperdisplay: replace keep_awake with fast, lag_frames 4 by default
mikeysklar Nov 5, 2026
1ce8bb2
epaperdisplay: turn fast e-paper on by default
mikeysklar Nov 10, 2026
be778a7
epaperdisplay: merge the two fast-only header blocks
mikeysklar Nov 10, 2026
4e258df
epaperdisplay: move lag drive state into its own struct
mikeysklar Nov 10, 2026
659ff40
epaperdisplay: rename the keep_awake member to fast
mikeysklar Nov 10, 2026
54401e4
epaperdisplay: move the lag drive into lag_drive.c
mikeysklar Nov 10, 2026
bbfbb7a
Merge remote-tracking branch 'origin/main' into epaperdisplay-fast
mikeysklar Nov 10, 2026
e37704a
epaperdisplay: no size cost when fast is off
mikeysklar Nov 11, 2026
8766b30
Turn off fast e-paper on boards short on flash or RAM
mikeysklar Nov 11, 2026
21670e1
Merge remote-tracking branch 'origin/main' into epaperdisplay-fast
mikeysklar Nov 11, 2026
f32c666
Merge main into epaperdisplay-fast
mikeysklar Nov 12, 2026
e1ce665
Merge main into epaperdisplay-fast
mikeysklar Nov 12, 2026
b6b4c43
Merge remote-tracking branch 'origin/main' into epaperdisplay-fast
mikeysklar Nov 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions locale/circuitpython.pot
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,7 @@ msgstr ""
#: ports/analog/common-hal/busio/SPI.c
#: ports/espressif/common-hal/espidf/__init__.c
#: ports/nordic/common-hal/_bleio/__init__.c
#: shared-bindings/epaperdisplay/EPaperDisplay.c
msgid "Invalid state"
msgstr ""

Expand Down Expand Up @@ -1737,8 +1738,10 @@ msgstr ""
#: ports/raspberrypi/common-hal/usb_host/Port.c
#: shared-bindings/digitalio/DigitalInOut.c shared-bindings/emmcio/EMMC.c
#: shared-bindings/i2cioexpander/IOPin.c shared-bindings/microcontroller/Pin.c
#: shared-module/_airlift/__init__.c shared-module/max3421e/Max3421E.c
#: shared-module/usb/core/Device.c shared-module/usb_host_audio/USBIn.c
#: shared-module/_airlift/__init__.c
#: shared-module/epaperdisplay/EPaperDisplay.c
#: shared-module/max3421e/Max3421E.c shared-module/usb/core/Device.c
#: shared-module/usb_host_audio/USBIn.c
msgid "%q in use"
msgstr ""

Expand Down
5 changes: 5 additions & 0 deletions ports/atmel-samd/mpconfigport.mk
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ CIRCUITPY_BUILTINS_POW3 ?= 0
CIRCUITPY_BUSDEVICE ?= 0
CIRCUITPY_COMPUTED_GOTO_SAVE_SPACE ?= 1
CIRCUITPY_COUNTIO ?= 0
CIRCUITPY_EPAPERDISPLAY_FAST ?= 0
# Not enough RAM for framebuffers
CIRCUITPY_FRAMEBUFFERIO ?= 0
CIRCUITPY_FREQUENCYIO ?= 0
Expand Down Expand Up @@ -123,6 +124,10 @@ endif
CIRCUITPY_ALARM ?= 1
# Not enough room for both bitmaptools and bitmapfilter on most boards.
CIRCUITPY_BITMAPFILTER ?= 0
# Fast e-paper only fits on chips with 1MB flash.
ifeq ($(HAS_1MB_FLASH),0)
CIRCUITPY_EPAPERDISPLAY_FAST ?= 0
endif
CIRCUITPY_FLOPPYIO ?= $(CIRCUITPY_FULL_BUILD)
CIRCUITPY_FRAMEBUFFERIO ?= $(CIRCUITPY_FULL_BUILD)
CIRCUITPY_LOAD_NATIVE ?= 1
Expand Down
3 changes: 3 additions & 0 deletions ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ CIRCUITPY_ESP_PSRAM_FREQ = 80m

# Out of internal RAM with audiopwmio
CIRCUITPY_AUDIOPWMIO = 0

# Fast e-paper doesn't fit in internal RAM.
CIRCUITPY_EPAPERDISPLAY_FAST = 0
3 changes: 3 additions & 0 deletions ports/espressif/boards/microdev_micro_s2/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ CIRCUITPY_ESP_PSRAM_FREQ = 80m

# Out of internal RAM with audiopwmio
CIRCUITPY_AUDIOPWMIO = 0

# Fast e-paper doesn't fit in internal RAM.
CIRCUITPY_EPAPERDISPLAY_FAST = 0
5 changes: 5 additions & 0 deletions ports/espressif/mpconfigport.mk
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ IDF_TARGET_ARCH = xtensa
CROSS_COMPILE = xtensa-$(IDF_TARGET)-elf-
endif

# Fast e-paper doesn't fit in flash on the C3, C5 and C6.
ifneq ($(filter $(IDF_TARGET),esp32c3 esp32c5 esp32c6),)
CIRCUITPY_EPAPERDISPLAY_FAST ?= 0
endif

# Use "internal flash" for CIRCUITPY drive.
# Even thought it's an external flash chip, it appears as internal.
INTERNAL_FLASH_FILESYSTEM = 1
Expand Down
2 changes: 2 additions & 0 deletions ports/nordic/boards/TG-Watch/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LC709203F
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DRV2605
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BLE
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BLE_Apple_Notification_Center

CIRCUITPY_EPAPERDISPLAY_FAST = 0
3 changes: 3 additions & 0 deletions ports/nordic/mpconfigport.mk
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ ifeq ($(INTERNAL_FLASH_FILESYSTEM),1)
CIRCUITPY_LTO_PARTITION = balanced
CIRCUITPY_MSGPACK ?= 0
CIRCUITPY_ULAB_OPTIMIZE_SIZE ?= 1
# Fast e-paper doesn't fit in what internal flash has left.
CIRCUITPY_EPAPERDISPLAY_FAST ?= 0
else
CIRCUITPY_USB_AUDIO ?= 1
endif
Expand Down Expand Up @@ -125,6 +127,7 @@ OPTIMIZATION_FLAGS ?= -Os
CIRCUITPY_LTO = 1
CIRCUITPY_LTO_PARTITION = one
ifeq ($(INTERNAL_FLASH_FILESYSTEM),1)
CIRCUITPY_EPAPERDISPLAY_FAST ?= 0
CIRCUITPY_FULL_BUILD ?= 0
CIRCUITPY_PULSEIO ?= 1
endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ"
CIRCUITPY__EVE = 1
CIRCUITPY_FLOPPYIO = 0
CIRCUITPY_SSL = 1
CIRCUITPY_EPAPERDISPLAY_FAST = 0
CIRCUITPY_USB_HOST = 0

# The default is -O3. Change to -O2 because the build was overflowing.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ EXTERNAL_FLASH_DEVICES = "W25Q32JVxQ"

CIRCUITPY__EVE = 1
CIRCUITPY_SSL = 1
CIRCUITPY_EPAPERDISPLAY_FAST = 0

# GPIO12-19 needed for picodvi, but GPIO16 is used for Wiznet.
CIRCUITPY_PICODVI = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ"
CIRCUITPY__EVE = 1
CIRCUITPY_FLOPPYIO = 0
CIRCUITPY_SSL = 1
CIRCUITPY_EPAPERDISPLAY_FAST = 0
CIRCUITPY_USB_HOST = 0

# The default is -O3. Change to -O2 because the build was overflowing.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ EXTERNAL_FLASH_DEVICES = "W25Q32JVxQ"

CIRCUITPY__EVE = 1
CIRCUITPY_SSL = 1
CIRCUITPY_EPAPERDISPLAY_FAST = 0

# GPIO12-19 needed for picodvi, but GPIO16 is used for Wiznet.
CIRCUITPY_PICODVI = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ EXTERNAL_FLASH_DEVICES = "PY25Q16HB"
CIRCUITPY_WIZNET = 1
CIRCUITPY__EVE = 1
CIRCUITPY_SSL = 1
CIRCUITPY_EPAPERDISPLAY_FAST = 0
CIRCUITPY_USB_HOST = 0

OPTIMIZATION_FLAGS = -O2
5 changes: 5 additions & 0 deletions ports/stm/mpconfigport.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ ifeq ($(INTERNAL_FLASH_FILESYSTEM),1)
OPTIMIZATION_FLAGS ?= -Os
endif

# Fast e-paper doesn't fit in flash on the F401 and F411.
ifeq ($(MCU_VARIANT),$(filter $(MCU_VARIANT),STM32F401xE STM32F411xE))
CIRCUITPY_EPAPERDISPLAY_FAST ?= 0
endif

ifeq ($(MCU_VARIANT),STM32F407xx)
UF2_FAMILY_ID ?= 0x6d0922fa
endif
Expand Down
1 change: 1 addition & 0 deletions py/circuitpy_defns.mk
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,7 @@ $(filter $(SRC_PATTERNS), \
_airlift/transport.c \
displayio/bus_core.c \
displayio/display_core.c \
epaperdisplay/lag_drive.c \
usb/utf16le.c \
)

Expand Down
5 changes: 5 additions & 0 deletions py/circuitpy_mpconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,11 @@ typedef long mp_off_t;
#define CIRCUITPY_BUSIO_SPI_ASYNC (0)
#endif

// Normally set from CIRCUITPY_EPAPERDISPLAY_FAST in the .mk files. zephyr-cp doesn't set it.
#ifndef CIRCUITPY_EPAPERDISPLAY_FAST
#define CIRCUITPY_EPAPERDISPLAY_FAST (0)
#endif

// These CIRCUITPY_xxx values should all be defined in the *.mk files as being on or off.
// So if any are not defined in *.mk, they'll throw an error here.

Expand Down
5 changes: 5 additions & 0 deletions py/circuitpy_mpconfig.mk
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,11 @@ CFLAGS += -DCIRCUITPY_QSPIBUS=$(CIRCUITPY_QSPIBUS)
CIRCUITPY_EPAPERDISPLAY ?= $(CIRCUITPY_DISPLAYIO)
CFLAGS += -DCIRCUITPY_EPAPERDISPLAY=$(CIRCUITPY_EPAPERDISPLAY)

# Fast e-paper updates: EPaperDisplay's write_previous_ram_command, fast, lag_frames
# and clean(). Ports and boards short on flash turn it off.
CIRCUITPY_EPAPERDISPLAY_FAST ?= $(CIRCUITPY_EPAPERDISPLAY)
CFLAGS += -DCIRCUITPY_EPAPERDISPLAY_FAST=$(CIRCUITPY_EPAPERDISPLAY_FAST)

CIRCUITPY_I2CDISPLAYBUS ?= $(CIRCUITPY_DISPLAYIO)
CFLAGS += -DCIRCUITPY_I2CDISPLAYBUS=$(CIRCUITPY_I2CDISPLAYBUS)

Expand Down
6 changes: 6 additions & 0 deletions shared-bindings/displayio/__init__.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,17 @@
//| Once you release a builtin display (one that is initialized automatically, not by user code),
//| the display will remain released even if you restart the CircuitPython VM, for instance by typing ctrl-D.
//| The display is not re-initialized until you do a hard reset or manually initialize it again.
//|
//| If an EPaperDisplay using ``lag_frames`` can't get its bus, this waits up to 30 seconds and then
//| raises `RuntimeError` with every display left as it was, so you can free the bus and call it again.
//| """
//| ...
//|
//|
static mp_obj_t displayio_release_displays(void) {
#if CIRCUITPY_EPAPERDISPLAY_FAST
displayio_prepare_release_displays();
#endif
common_hal_displayio_release_displays();
return mp_const_none;
}
Expand Down
Loading
Loading