Struct omnisensor::gpio::BridgeGPIO
source · [−]pub struct BridgeGPIO {
line: FoundLine,
cfg: Arc<BridgeGPIOConfig>,
req: Request,
active: bool,
}Expand description
Represents a GPIO that must be asserted
Fields
line: FoundLinecfg: Arc<BridgeGPIOConfig>req: Requestactive: boolImplementations
sourceimpl BridgeGPIO
impl BridgeGPIO
sourcepub fn from_config(cfg: Arc<BridgeGPIOConfig>) -> Result<Self, Box<dyn Error>>
pub fn from_config(cfg: Arc<BridgeGPIOConfig>) -> Result<Self, Box<dyn Error>>
Construct a BridgeGPIO from a BridgeGPIOConfig
sourcepub async fn activate(
&mut self
) -> Result<BridgeGPIOActivation<'_>, Box<dyn Error>>
pub async fn activate(
&mut self
) -> Result<BridgeGPIOActivation<'_>, Box<dyn Error>>
Sets the GPIO to its activate state and returns a
BridgeGPIOActivation guard object that will reset it when
dropped.
Auto Trait Implementations
impl RefUnwindSafe for BridgeGPIO
impl Send for BridgeGPIO
impl Sync for BridgeGPIO
impl Unpin for BridgeGPIO
impl UnwindSafe for BridgeGPIO
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more