The ESP32 side of ext-led: it implements the neutral LED-strip HAL
(bm_ledstrip_hal.h) over Espressif's led_strip component on the RMT peripheral. It creates the strips behind
the Baremetal\Led\Driver\* classes, writes their pixels and sends the frames.
| Field | Value |
|---|---|
| Type | bm-hal |
| Platform | esp32 (extra.baremetal.platform) |
| Provides | php-baremetal/ledstrip-hal |
| ESP-IDF registry components | espressif/led_strip ==3.1.0~1 (idf-dependencies) |
Install
Projects do not require it. A project requires a chip package (led-ws2812, led-sk6812), which requires
ext-led, which requires the virtual php-baremetal/ledstrip-hal; conductor reads the platform from
extra.baremetal.sdk (esp32@^2.0) and adds this package while Composer resolves:
composer require php-baremetal/led-ws2812
The first build downloads espressif/led_strip through the ESP-IDF component manager, so it needs network
access.
Behaviour
- One RMT channel per strip. Each strip is a
led_stripRMT device: one RMT transmit channel, default clock source, 10 MHz resolution (0.1 microsecond per tick), no DMA, output not inverted. ESP32-S3 and ESP32-P4 have 4 transmit channels; when none is free the constructor throwscannot init NAME on GPIO N. - Models.
BM_LED_MODEL_SK6812selectsled_strip's SK6812 timing; every other value selects WS2812. - Colour order.
LED_ORDER_RGB,LED_ORDER_GRBWandLED_ORDER_RGBWmap to the matchingled_stripcomponent formats; anything else is GRB. - Frames. Pixel writes go to
led_strip's buffer;show()callsled_strip_refresh(), which waits until the frame is out, on the calling PHP task. Deleting a strip releases its channel without clearing the LEDs. - Errors. The functions return the
esp_err_tofled_strip; ext-led checks only strip creation.
License
MIT.