[−][src]Struct buspirate::BusPirate
BusPirate
represents a Bus Pirate device in its normal terminal mode, not
yet initialized into any binary mode.
The primary method on BusPirate
is to_bitbang
, which transitions the
device into "binary bit-bang" mode. That mode then also allows transitions
into the other binary modes.
let bb = bp.to_bitbang()?;
Methods
impl<TX, RX, TXErr, RXErr> BusPirate<TX, RX> where
TX: Write<u8, Error = TXErr>,
RX: Read<u8, Error = RXErr>,
[src]
TX: Write<u8, Error = TXErr>,
RX: Read<u8, Error = RXErr>,
pub fn new(tx: TX, rx: RX) -> Self
[src]
BusPirate::new
associates some serial channels with a new BusPirate
object.
The transmit and receive objects are consumed. If the caller needs to
access them again, it must call release
to discard the BusPirate
object and recover the original objects.
pub fn to_bitbang(self) -> Result<BitBang<TX, RX>, Error<TXErr, RXErr>>
[src]
to_bitbang
directs the Bus Pirate to move into "binary bit-bang" mode.
The Bus Pirate requires several steps to properly switch from terminal mode into binary bitbang mode, so this method can potentially be slow due to sending and receiving several characters.
to_bitbang
consumes the BusPirate
object and returns a BitBang
object in its place. To recover the BusPirate
object, call close
on the BitBang
object to reset the Bus Pirate back into terminal mode.
pub fn release(self) -> (TX, RX)
[src]
release
returns the serial transmit and receive objects wrapped by
the BusPirate
object.
This consumes the BusPirate
object.
Trait Implementations
impl<TX: Debug + Write<u8>, RX: Debug + Read<u8>> Debug for BusPirate<TX, RX>
[src]
impl<TX: Clone + Write<u8>, RX: Clone + Read<u8>> Clone for BusPirate<TX, RX>
[src]
Auto Trait Implementations
impl<TX, RX> Send for BusPirate<TX, RX> where
RX: Send,
TX: Send,
RX: Send,
TX: Send,
impl<TX, RX> Sync for BusPirate<TX, RX> where
RX: Sync,
TX: Sync,
RX: Sync,
TX: Sync,
impl<TX, RX> Unpin for BusPirate<TX, RX> where
RX: Unpin,
TX: Unpin,
RX: Unpin,
TX: Unpin,
Blanket Implementations
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,