Struct UsbSerialJtagRx

Source
pub struct UsbSerialJtagRx<'d, Dm: DriverMode> { /* private fields */ }
Available on crate feature unstable only.
Expand description

USB Serial/JTAG (Receive)

Implementations§

Source§

impl<'d, Dm> UsbSerialJtagRx<'d, Dm>
where Dm: DriverMode,

Source

pub fn read_byte(&mut self) -> Result<u8, Infallible>

Read a byte from the UART in a non-blocking manner

Source

pub fn drain_rx_fifo(&mut self, buf: &mut [u8]) -> usize

Read all available bytes from the RX FIFO into the provided buffer and returns the number of read bytes. Never blocks. May stop early if the number of bytes in the FIFO is larger than buf.

Source

pub fn listen_rx_packet_recv_interrupt(&mut self)

Listen for RX-PACKET-RECV interrupts

Source

pub fn unlisten_rx_packet_recv_interrupt(&mut self)

Stop listening for RX-PACKET-RECV interrupts

Source

pub fn rx_packet_recv_interrupt_set(&mut self) -> bool

Checks if RX-PACKET-RECV interrupt is set

Source

pub fn reset_rx_packet_recv_interrupt(&mut self)

Reset RX-PACKET-RECV interrupt

Trait Implementations§

Source§

impl<Dm> ErrorType for UsbSerialJtagRx<'_, Dm>
where Dm: DriverMode,

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Source§

type Error = Infallible

Error type of all the IO operations on this type.
Source§

impl Read for UsbSerialJtagRx<'_, Async>

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Source§

async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>

Read some bytes from this source into the specified buffer, returning how many bytes were read. Read more
Source§

async fn read_exact( &mut self, buf: &mut [u8], ) -> Result<(), ReadExactError<Self::Error>>

Read the exact number of bytes required to fill buf. Read more
Source§

impl<Dm> Read for UsbSerialJtagRx<'_, Dm>
where Dm: DriverMode,

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Source§

fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>

Read some bytes from this source into the specified buffer, returning how many bytes were read. Read more
Source§

fn read_exact( &mut self, buf: &mut [u8], ) -> Result<(), ReadExactError<Self::Error>>

Read the exact number of bytes required to fill buf. Read more

Auto Trait Implementations§

§

impl<'d, Dm> Freeze for UsbSerialJtagRx<'d, Dm>

§

impl<'d, Dm> RefUnwindSafe for UsbSerialJtagRx<'d, Dm>
where Dm: RefUnwindSafe,

§

impl<'d, Dm> Send for UsbSerialJtagRx<'d, Dm>
where Dm: Send,

§

impl<'d, Dm> Sync for UsbSerialJtagRx<'d, Dm>
where Dm: Sync,

§

impl<'d, Dm> Unpin for UsbSerialJtagRx<'d, Dm>
where Dm: Unpin,

§

impl<'d, Dm> !UnwindSafe for UsbSerialJtagRx<'d, Dm>

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where 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>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where 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>

Performs the conversion.