1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//! # SK6812 LED Driver
//!
//! This module provides driver support for SK6812 LEDs, which use a
//! single-wire, timing-sensitive protocol similar to [`super::ws2812`].
//!
//! # Drivers
//!
//! - [`Sk6812Delay`]: Uses bit-banged GPIO
//! - [`blinksy-esp::Sk6812Rmt`]: On ESP devices, uses RMT peripheral
//!
//! ## Key Features
//!
//! - Single-wire protocol (data only, no clock)
//! - 32-bit color (8 bits per channel)
//! - Timing-sensitive protocol
//!
//! ## Protocol Details
//!
//! The SK6812 protocol uses precise timing of pulses on a single data line:
//!
//! - A '0' bit is represented by a short high pulse (~300ns) followed by a long low pulse (~900ns)
//! - A '1' bit is represented by a long high pulse (~600ns) followed by a long low pulse (~600ns)
//! - After sending all bits, a reset pulse of at least 80µs is required
//!
//! (References: [Datasheet](https://cdn-shop.adafruit.com/product-files/2757/p2757_SK6812RGBW_REV01.pdf))
//!
//! Each LED receives 32 bits (RGBW) and then passes subsequent data to the next LED in the chain.
//!
//! [`blinksy-esp::Sk6812Rmt`]: https://docs.rs/blinksy-esp/0.10/blinksy-esp/type.Sk6812Rmt.html
use NanosDurationU32 as Nanoseconds;
use crate::;
/// LED implementation for SK6812 protocol.
///
/// This type implements the ClocklessLed trait with the specifics of the SK6812 protocol,
/// including timing requirements and color channel ordering.
;
/// SK6812 driver using GPIO bit-banging with delay timing.
///
/// # Type Parameters
///
/// * `Pin` - The data pin type
/// * `Delay` - The delay implementation type
///
/// Note: This will not work unless your delay timer is able to handle microsecond
/// precision, which most microcontrollers cannot do.
pub type Sk6812Delay<Pin, Delay> = ;