#[cfg(all(not(doc), not(feature = "host"), target_os = "none"))]
use crate::button_watch;
#[cfg(all(not(doc), not(feature = "host"), target_os = "none", esp_gdma_family))]
button_watch! {
pub ButtonWatchGenerated {
pin: GPIO0,
}
}
#[cfg(all(not(doc), not(feature = "host"), target_os = "none", esp_pdma_family))]
button_watch! {
pub ButtonWatchGenerated {
pin: GPIO0,
}
}
#[cfg(doc)]
pub struct ButtonWatchGenerated;
#[cfg(doc)]
impl ButtonWatchGenerated {
pub async fn new(
button_pin: impl Sized,
pressed_to: crate::button::PressedTo,
spawner: embassy_executor::Spawner,
) -> crate::Result<&'static mut Self> {
static INSTANCE: static_cell::StaticCell<ButtonWatchGenerated> =
static_cell::StaticCell::new();
let instance = INSTANCE.init(ButtonWatchGenerated);
let _ = (button_pin, pressed_to, spawner);
Ok(instance)
}
}
#[cfg(doc)]
impl crate::button::__ButtonMonitor for ButtonWatchGenerated {
fn is_pressed_raw(&self) -> bool {
false
}
async fn wait_until_pressed_state(&mut self, pressed: bool) {
let _ = pressed;
}
}
#[cfg(doc)]
impl crate::button::Button for ButtonWatchGenerated {}