#[cfg(all(not(doc), not(feature = "host")))]
use crate::led2d;
#[cfg(all(not(doc), not(feature = "host")))]
const LED_LAYOUT_12X4: crate::led2d::LedLayout<48, 12, 4> =
crate::led2d::LedLayout::serpentine_column_major();
#[cfg(all(not(doc), not(feature = "host")))]
led2d! {
pub Led2dGenerated {
pin: PIN_3,
led_layout: LED_LAYOUT_12X4,
font: crate::led2d::Led2dFont::Font3x4Trim,
}
}
#[cfg(doc)]
pub struct Led2dGenerated;
#[cfg(doc)]
use crate::Result;
#[cfg(doc)]
use crate::led2d::{Frame2d, Led2d, Led2dFont, Point, Size};
#[cfg(doc)]
impl Led2dGenerated {
pub const MAX_FRAMES: usize = 16;
pub const MAX_BRIGHTNESS: u8 = 22;
pub const FONT: Led2dFont = Led2dFont::Font3x4Trim;
pub const WIDTH: usize = 12;
pub const HEIGHT: usize = 4;
pub const LEN: usize = 48;
pub const SIZE: Size = Frame2d::<12, 4>::SIZE;
pub const TOP_LEFT: Point = Frame2d::<12, 4>::TOP_LEFT;
pub const TOP_RIGHT: Point = Frame2d::<12, 4>::TOP_RIGHT;
pub const BOTTOM_LEFT: Point = Frame2d::<12, 4>::BOTTOM_LEFT;
pub const BOTTOM_RIGHT: Point = Frame2d::<12, 4>::BOTTOM_RIGHT;
pub fn new(
pin: embassy_rp::Peri<'static, embassy_rp::peripherals::PIN_3>,
pio: embassy_rp::Peri<'static, embassy_rp::peripherals::PIO0>,
dma: embassy_rp::Peri<'static, embassy_rp::peripherals::DMA_CH0>,
spawner: embassy_executor::Spawner,
) -> Result<Self> {
let _ = (pin, pio, dma, spawner);
Ok(Self)
}
}
#[cfg(doc)]
impl Led2d<12, 4> for Led2dGenerated {
const WIDTH: usize = Self::WIDTH;
const HEIGHT: usize = Self::HEIGHT;
const LEN: usize = Self::LEN;
const SIZE: Size = Self::SIZE;
const TOP_LEFT: Point = Self::TOP_LEFT;
const TOP_RIGHT: Point = Self::TOP_RIGHT;
const BOTTOM_LEFT: Point = Self::BOTTOM_LEFT;
const BOTTOM_RIGHT: Point = Self::BOTTOM_RIGHT;
const MAX_FRAMES: usize = Self::MAX_FRAMES;
const MAX_BRIGHTNESS: u8 = Self::MAX_BRIGHTNESS;
const FONT: Led2dFont = Self::FONT;
fn write_frame(&self, frame2d: Frame2d<12, 4>) {
let _ = frame2d;
}
fn animate<I>(&self, frames: I)
where
I: IntoIterator,
I::Item: core::borrow::Borrow<(Frame2d<12, 4>, embassy_time::Duration)>,
{
let _ = frames;
}
}