Files
smart_lights/src/strip.rs
T

19 lines
634 B
Rust

//! The WS2812B strip, as driven by the upstream `esp-hal-smartled` adapter.
//!
//! This only names the concrete type so the rest of the application does not
//! carry the adapter's four generic parameters around.
use esp_hal::Async;
use esp_hal_smartled::RmtSmartLeds;
use esp_hal_smartled::buffer_size;
use esp_hal_smartled::color_order::Grb;
use smart_leds::RGB8;
use crate::config::LED_COUNT;
/// 24 pulses per pixel plus the reset and end-marker codes.
pub const BUFFER_SIZE: usize = buffer_size::<RGB8>(LED_COUNT);
/// WS2812B pixels latch green first.
pub type Strip<'d> = RmtSmartLeds<'d, BUFFER_SIZE, Async, RGB8, Grb>;