pub struct PioOneWire<'d, PIO: Instance, const SM: usize> { /* private fields */ }Expand description
Pio backed OneWire driver
Implementations§
Source§impl<'d, PIO: Instance, const SM: usize> PioOneWire<'d, PIO, SM>
impl<'d, PIO: Instance, const SM: usize> PioOneWire<'d, PIO, SM>
Sourcepub fn new(
common: &mut Common<'d, PIO>,
sm: StateMachine<'d, PIO, SM>,
pin: Peri<'d, impl PioPin>,
program: &PioOneWireProgram<'d, PIO>,
) -> Self
pub fn new( common: &mut Common<'d, PIO>, sm: StateMachine<'d, PIO, SM>, pin: Peri<'d, impl PioPin>, program: &PioOneWireProgram<'d, PIO>, ) -> Self
Create a new instance the driver
Sourcepub async fn reset(&mut self) -> bool
pub async fn reset(&mut self) -> bool
Perform an initialization sequence, will return true if a presence pulse was detected from a device
Sourcepub async fn write_bytes(&mut self, data: &[u8])
pub async fn write_bytes(&mut self, data: &[u8])
Write bytes to the onewire bus
Sourcepub async fn write_bytes_pullup(&mut self, data: &[u8], pullup_time: Duration)
pub async fn write_bytes_pullup(&mut self, data: &[u8], pullup_time: Duration)
Write bytes to the onewire bus, then apply a strong pullup
Sourcepub async fn read_bytes(&mut self, data: &mut [u8])
pub async fn read_bytes(&mut self, data: &mut [u8])
Read bytes from the onewire bus
Auto Trait Implementations§
impl<'d, PIO, const SM: usize> !UnwindSafe for PioOneWire<'d, PIO, SM>
impl<'d, PIO, const SM: usize> Freeze for PioOneWire<'d, PIO, SM>
impl<'d, PIO, const SM: usize> RefUnwindSafe for PioOneWire<'d, PIO, SM>
impl<'d, PIO, const SM: usize> Send for PioOneWire<'d, PIO, SM>
impl<'d, PIO, const SM: usize> Sync for PioOneWire<'d, PIO, SM>
impl<'d, PIO, const SM: usize> Unpin for PioOneWire<'d, PIO, SM>
impl<'d, PIO, const SM: usize> UnsafeUnpin for PioOneWire<'d, PIO, SM>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more