Move the LED strip example to C++ and split the driver into a WS2812 class (ws2812.h/.cpp). The class takes the GPIO and LED count in its constructor and provides set(), fill(), write(), setBrightness() and a static hsv2rgb(). The RMT encoder is now internal to ws2812.cpp. Also adds a top-level Makefile wrapping idf.py for Linux, macOS and Windows, and a .gitignore for build output. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
16 lines
657 B
Python
16 lines
657 B
Python
# SPDX-FileCopyrightText: 2021-2026 Espressif Systems (Shanghai) CO LTD
|
|
# SPDX-License-Identifier: CC0-1.0
|
|
import pytest
|
|
from pytest_embedded import Dut
|
|
from pytest_embedded_idf.utils import idf_parametrize
|
|
from pytest_embedded_idf.utils import soc_filtered_targets
|
|
|
|
|
|
@pytest.mark.generic
|
|
@idf_parametrize('target', soc_filtered_targets('SOC_RMT_SUPPORTED == 1'), indirect=['target'])
|
|
def test_led_strip_example(dut: Dut) -> None:
|
|
dut.expect_exact('example: Create RMT TX channel')
|
|
dut.expect_exact('example: Install led strip encoder')
|
|
dut.expect_exact('example: Enable RMT TX channel')
|
|
dut.expect_exact('example: Start LED rainbow chase')
|