fn state_to_value(state: embedded_hal::digital::PinState, is_active_low: bool) -> u8 {
    if is_active_low {
        match state {
            embedded_hal::digital::PinState::High => 0,
            embedded_hal::digital::PinState::Low => 1,
        }
    } else {
        match state {
            embedded_hal::digital::PinState::High => 1,
            embedded_hal::digital::PinState::Low => 0,
        }
    }
}
/// Converts a pin state to the gpio_cdev compatible numeric value, accounting
/// for the active_low condition.
Converts a pin state to the gpio_cdev compatible numeric value, accounting
for the active_low condition.
Converts a pin state to the gpio_cdev compatible numeric value accounting for the active_low condition .
fn state_to_value(state: embedded_hal::digital::PinState, is_active_low: bool) -> u8 {
    if is_active_low {
        match state {
            embedded_hal::digital::PinState::High => 0,
            embedded_hal::digital::PinState::Low => 1,
        }
    } else {
        match state {
            embedded_hal::digital::PinState::High => 1,
            embedded_hal::digital::PinState::Low => 0,
        }
    }
}
fn state_to_value ( state : embedded_hal :: digital :: PinState , is_active_low : bool ) -> u8 { if is_active_low { match state { embedded_hal :: digital :: PinState :: High => 0 , embedded_hal :: digital :: PinState :: Low => 1 , } } else { match state { embedded_hal :: digital :: PinState :: High => 1 , embedded_hal :: digital :: PinState :: Low => 0 , } } }
Converts a pin state to the gpio_cdev compatible numeric value, accounting
for the active_low condition.
Converts a pin state to the gpio_cdev compatible numeric value accounting for the active_low condition .
state
embedded_hal::digital::PinState
is_active_low
bool