#[cfg(doc)]
use crate::Result;
#[cfg(doc)]
use crate::ir::{Ir, IrEvent, IrKepler, IrMapping, KeplerKeys};
#[cfg(doc)]
pub struct IrGenerated;
#[cfg(doc)]
impl IrGenerated {
pub fn new(
pin: impl Sized,
channel_creator: impl Sized,
spawner: embassy_executor::Spawner,
) -> Result<&'static Self> {
static INSTANCE: IrGenerated = IrGenerated;
let _ = (pin, channel_creator, spawner);
Ok(&INSTANCE)
}
}
#[cfg(doc)]
impl Ir for IrGenerated {
async fn wait_for_press(&self) -> IrEvent {
core::future::pending().await
}
}
#[cfg(doc)]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RemoteKeysGenerated {
Power,
Play,
Stop,
}
#[cfg(doc)]
pub struct IrMappingGenerated;
#[cfg(doc)]
impl IrMappingGenerated {
pub fn new(
pin: impl Sized,
channel_creator: impl Sized,
button_map: &[(u16, u8, RemoteKeysGenerated)],
spawner: embassy_executor::Spawner,
) -> Result<&'static Self> {
static INSTANCE: IrMappingGenerated = IrMappingGenerated;
let _ = (pin, channel_creator, button_map, spawner);
Ok(&INSTANCE)
}
}
#[cfg(doc)]
impl IrMapping<RemoteKeysGenerated> for IrMappingGenerated {
async fn wait_for_press(&self) -> RemoteKeysGenerated {
core::future::pending().await
}
}
#[cfg(doc)]
pub struct IrKeplerGenerated;
#[cfg(doc)]
impl IrKeplerGenerated {
pub fn new(
pin: impl Sized,
channel_creator: impl Sized,
spawner: embassy_executor::Spawner,
) -> Result<&'static Self> {
static INSTANCE: IrKeplerGenerated = IrKeplerGenerated;
let _ = (pin, channel_creator, spawner);
Ok(&INSTANCE)
}
}
#[cfg(doc)]
impl IrKepler for IrKeplerGenerated {
async fn wait_for_press(&self) -> KeplerKeys {
core::future::pending().await
}
}