Changelog¶
What changed in each release of the driver. Entries marked BREAKING need source changes in code that used the affected API.
[Unreleased]¶
Breaking¶
WS2812Strip::Show()sends green first. Pixels are0xRRGGBB(0xWWRRGGBBfor RGBW) and go out in the WS2812B order G, R, B (then W, the SK6812RGBW order). Before, the packed value went out as it was, so red came first and RGBW sent white first. Code that packed0xGGRRBBto work around it now swaps red and green: pack0xRRGGBBand drop the workaround.ColorWheel()and the effects now show their intended colours.- Kconfig timing defaults are WS2812B values in 100 ns ticks (
CONFIG_WS2812_T0H/T1H/T0L/T1L= 4, 8, 9, 5, was 14, 52, 52, 52, which a WS2812B read as all ones). Constructor calls without timing arguments and the C interface change output. A projectsdkconfigkeeps old values until you edit it. ws2812::RmtTxandWS2812Stripno longer abort when the RMT channel cannot be created.WS2812Strip::Begin()returns the error (and retries) instead of alwaysESP_OK; until it succeedsShow()returnsESP_ERR_INVALID_STATE. CheckBegin()where you relied on the abort.ws2812::RmtTxtransmit timeouts are milliseconds.Transmit(),TransmitBytes()andTransmitWs2812()takeint32_t timeout_ms(defaultRmtTx::kWaitForever, -1), asrmt_tx_wait_all_done()does. They took aTickType_tand passed it to that call unconverted, so apdMS_TO_TICKS()timeout was read as milliseconds (wrong by 10x at 100 Hz). Calls with no timeout, or withportMAX_DELAY, behave as before. An argument of typeTickType_tnow selects a deprecated overload that converts ticks to milliseconds (RmtTx::TicksToTimeoutMs()); pass milliseconds instead.ws2812_control_init()returnsESP_ERR_INVALID_STATEwhen called a second time (it used to leak a channel), andws2812_write_leds()before init returnsESP_ERR_INVALID_STATE.
Fixed¶
ws2812_write_leds()sent the bytes of its RMT symbol buffer through the byte encoder instead of the colours; it now sends the pixel bytes in wire order with the Kconfig timing and a reset.Show()sends a reset (line low forWS2812Strip::kResetTimeUs= 300 µs, WS2812B-V5 needs at least 280 µs) after every frame, so back-to-back frames latch.- Each strip requests one RMT memory block of the target (
SOC_RMT_MEM_WORDS_PER_CHANNEL: 48 symbols on S3, C3, C6, H2) instead of 64 symbols, which took two blocks there and left no memory for a second strip on the two-channel chips. Override withWS2812_RMT_MEM_BLOCK_SYMBOLS. ws2812_write_leds()waits with -1 (forever) instead ofportMAX_DELAYcast to the millisecond argument.ws2812_control_init()releases the channel and encoder when a later step fails.- CMake: install rules for the library, headers and generated version header, an exported
hf::hf_ws2812_rmttarget and a package config that works after install (it included an uninstalled file); the project version comes from the build settings. - The ESP32 example is a real hardware test (colours, brightness, animation, two strips) instead of a placeholder; its config header compiles.
Added¶
ws2812::RmtTx::kWaitForeverandRmtTx::TicksToTimeoutMs(); a host test checks the timeout each transmit call hands tormt_tx_wait_all_done().ws2812::RmtTx::Init(),InitStatus(),IsReady();WS2812Strip::kResetTimeUs;ws2812_rmt_caps.h.led_strip_encoder_config_ttakes optional bit times and reset length (0 keeps the WS2812B defaults, now 400/850/800/450 ns and 300 µs instead of 300/900/900/300 ns and 50 µs).-
Host tests for the colour order, reset, Kconfig timing, channel memory, set-up failures and the C interface; CI installs the package and runs a
find_packageconsumer. -
Host unit tests (
-DHF_WS2812_RMT_BUILD_TESTS=ON) that build the driver sources against stubs of the ESP-IDF headers and a recording fake of the RMT driver, and a CI workflow that runs them with GCC and Clang.
Changed¶
- Documentation moved to the HardFOC MkDocs platform: new page set (quickstart, hardware, architecture, signal
timing, API guide, configuration, porting, testing), code snippets compiled by the host build from
tests/docs/, Doxygen under/api/, versioned with mike. The Jekyll site files and the doxygen-awesome submodule are gone. - The ESP32 example's description and README describe the test application as it is.
- The Kconfig help says
CONFIG_WS2812_LED_RMT_TX_CHANNELis unused: ESP-IDF v5 allocates RMT channels itself.
1.0.0 (version in the build settings; not tagged)¶
WS2812Stripover the ESP-IDF v5 RMT driver, RGB and RGBW, brightness, run-time timing and length.WS2812Animatoreffects andWS2812MultiAnimator; the C interface inws2812_control.h.