Skip to content

zephyr-cp: enable adafruit_pixelbuf and _pixelmap on boards with neopixel_write - #11538

Merged
tannewt merged 2 commits into
adafruit:mainfrom
dhalbert:zephyr-cp-pixelbuf
Oct 8, 2026
Merged

tannewt merged 2 commits into
adafruit:mainfrom
dhalbert:zephyr-cp-pixelbuf

Conversation

@dhalbert

@dhalbert dhalbert commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Change by Claude, directed by @dhalbert.

  • Enable adafruit_pixelbuf and _pixelmap on zephyr-cp boards that have neopixel_write. For now that's the nRF boards with CONFIG_PWM_NRFX. This is done by adding neopixel_write to REVERSE_DEPENDENCIES in cptools/build_circuitpython.py.
  • Regenerate autogen_board_info.toml for the six affected boards.

Bug found and fixed in passing

  • Fix _pixelmap.PixelMap() constructor args, which had no MP_ARG_OBJ kind and tripped an assert() in mp_arg_parse_all(). Ports built with NDEBUG didn't notice, but on zephyr-cp every PixelMap() call hung the board.

Testing

  • All six boards build: feather_nrf52840_zephyr, feather_nrf52840_sense_zephyr, clue_nrf52840_zephyr, nrf5340dk, nrf54l15dk, nrf54lm20dk.
  • Tested PixelBuf and PixelMap on a Feather nRF52840 with the onboard NeoPixel and a 16-pixel RGBW ring on A0: even/odd maps, grouped indices, a reversed map with slice assignment, and auto_write=False with show().

dhalbert and others added 2 commits October 8, 2026 12:43
Boards with neopixel_write now also get adafruit_pixelbuf and
_pixelmap. Regenerated autogen_board_info.toml for the six affected
nRF boards; the regeneration also picks up pending usb_host_bulk and
watchdog changes from main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both args had kind 0, which mp_arg_parse_all() asserts against. Ports
built with NDEBUG skipped the assert; zephyr-cp keeps asserts on, so
every PixelMap() call hung the board.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@tannewt tannewt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@tannewt
tannewt merged commit b26404d into adafruit:main Oct 8, 2026
596 checks passed
@dhalbert
dhalbert deleted the zephyr-cp-pixelbuf branch October 9, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants