#[cfg(all(not(doc), not(feature = "host"), target_os = "none"))]
use crate::led_strip;
#[cfg(all(not(doc), not(feature = "host"), target_os = "none"))]
led_strip! {
LedStripGenerated {
pin: GPIO2,
len: 8,
max_current: crate::led_strip::Current::Milliamps(250),
}
}
#[cfg(doc)]
pub struct LedStripGenerated;
#[cfg(doc)]
use crate::led_strip::{Frame1d, LedStrip};
#[cfg(doc)]
use crate::Result;
#[cfg(doc)]
impl LedStripGenerated {
pub const LEN: usize = 8;
pub const MAX_FRAMES: usize = 16;
pub const MAX_BRIGHTNESS: u8 = crate::led_strip::Current::Milliamps(250).max_brightness(8 * 60);
pub fn new(
pin: impl Sized,
channel_creator: impl Sized,
spawner: embassy_executor::Spawner,
) -> Result<&'static Self> {
static INSTANCE: LedStripGenerated = LedStripGenerated;
let _ = (pin, channel_creator, spawner);
Ok(&INSTANCE)
}
}
#[cfg(doc)]
impl LedStrip<8> for LedStripGenerated {
const LEN: usize = Self::LEN;
const MAX_FRAMES: usize = Self::MAX_FRAMES;
const MAX_BRIGHTNESS: u8 = Self::MAX_BRIGHTNESS;
fn write_frame(&self, frame: Frame1d<8>) {
let _ = frame;
}
fn animate<I>(&self, frames: I)
where
I: IntoIterator,
I::Item: core::borrow::Borrow<(Frame1d<8>, embassy_time::Duration)>,
{
let _ = frames;
}
}