Trait esp_ward::peripherals::UnifiedData

source ·
pub trait UnifiedData {
    type Output;

    // Required method
    fn read(&mut self, delay: Delay) -> Result<Self::Output, PeripheralError>;
}
Expand description

Trait for peripherals capable of returning data (which would be serialized).

Required Associated Types§

Required Methods§

source

fn read(&mut self, delay: Delay) -> Result<Self::Output, PeripheralError>

Implementors§

source§

impl UnifiedData for Aht20Sensor

§

type Output = (f32, f32)

source§

impl UnifiedData for Bme280Sensor

§

type Output = (f32, f32, f32)

source§

impl UnifiedData for Sgp30Sensor

§

type Output = (f32, f32)

source§

impl UnifiedData for Tsl2591Sensor

§

type Output = f32

source§

impl<PIN: InputPin<Error = Infallible>> UnifiedData for PirSensor<PIN>

§

type Output = bool

source§

impl<T: InputPin<Error = Infallible>> UnifiedData for Button<T>

§

type Output = bool