refactor(led): drive the strip through the smart-leds traits

Replaces the hand-rolled Rgb type, HSV conversion and brightness scaling
with RGB8, hsv2rgb, gamma and brightness from smart-leds, and exposes the
driver as SmartLedsWriteAsync. The RMT symbol encoding stays in-tree: no
upstream RMT driver currently targets esp-hal 1.1.
This commit is contained in:
Matt Spencer committed 2026-10-17 15:42:13 +01:00
1 parent bb81182daa
commit e021ab751a
6 files changed
+102 -90

No files matched your search

Generated
+26
View File
@@ -1540,6 +1540,12 @@ version = "0.8.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
[[package]]
name = "rgb"
version = "0.8.53"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "47b34b781b31e5d73e9fbc8689c70551fd1ade9a19e3e28cfec8580a79290cc4"
[[package]]
name = "riscv"
version = "0.15.0"
@@ -1702,6 +1708,24 @@ version = "1.16.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b3dc8af474f516a851ff4bd12db780f948b9250ad37211e4eec0bccea54e01b"
[[package]]
name = "smart-leds"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "66df34e571fa9993fa6f99131a374d58ca3d694b75f9baac93458fe0d6057bf0"
dependencies = [
"smart-leds-trait",
]
[[package]]
name = "smart-leds-trait"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7f4441a131924d58da6b83a7ad765c460e64630cce504376c3a87a2558c487f"
dependencies = [
"rgb",
]
[[package]]
name = "smart-light"
version = "0.1.0"
@@ -1720,6 +1744,8 @@ dependencies = [
"esp-rtos",
"esp-storage",
"log",
"smart-leds",
"smart-leds-trait",
"static_cell",
"zigbee",
"zigbee-cluster-library",