2 `neopixel_write` - NeoPixel precision timed writing support
3 ===========================================================
5 See `CircuitPython:neopixel_write` in CircuitPython for more details.
6 Currently supported on Raspberry Pi only.
13 from adafruit_blinka.agnostic import detector
15 if detector.board.any_raspberry_pi:
16 from adafruit_blinka.microcontroller.bcm283x import neopixel as _neopixel
17 elif detector.board.pico_u2if:
18 from adafruit_blinka.microcontroller.rp2040_u2if import neopixel as _neopixel
20 detector.board.feather_u2if
21 or detector.board.qtpy_u2if
22 or detector.board.itsybitsy_u2if
23 or detector.board.macropad_u2if
24 or detector.board.qt2040_trinkey_u2if
26 from adafruit_blinka.microcontroller.rp2040_u2if import neopixel as _neopixel
27 elif "sphinx" in sys.modules:
30 raise NotImplementedError("Board not supported")
33 def neopixel_write(gpio, buf):
34 """Write buf out on the given DigitalInOut."""
35 return _neopixel.neopixel_write(gpio, buf)