Struct esp32c3_hal::UsbSerialJtag
source · pub struct UsbSerialJtag<'d> { /* private fields */ }
Expand description
USB Serial JTAG driver
Implementations§
source§impl<'d> UsbSerialJtag<'d>
impl<'d> UsbSerialJtag<'d>
sourcepub fn new(
usb_serial: impl Peripheral<P = USB_DEVICE> + 'd
) -> UsbSerialJtag<'d>
pub fn new( usb_serial: impl Peripheral<P = USB_DEVICE> + 'd ) -> UsbSerialJtag<'d>
Create a new USB serial/JTAG instance with defaults
sourcepub fn write_bytes(&mut self, data: &[u8]) -> Result<(), Infallible>
pub fn write_bytes(&mut self, data: &[u8]) -> Result<(), Infallible>
Write data to the serial output in chunks of up to 64 bytes
sourcepub fn write_byte_nb(&mut self, word: u8) -> Result<(), Error<Infallible>>
pub fn write_byte_nb(&mut self, word: u8) -> Result<(), Error<Infallible>>
Write data to the serial output in a non-blocking manner Requires manual flushing (automatically flushed every 64 bytes)
sourcepub fn flush_tx(&mut self) -> Result<(), Infallible>
pub fn flush_tx(&mut self) -> Result<(), Infallible>
Flush the output FIFO and block until it has been sent
sourcepub fn flush_tx_nb(&mut self) -> Result<(), Error<Infallible>>
pub fn flush_tx_nb(&mut self) -> Result<(), Error<Infallible>>
Flush the output FIFO but don’t block if it isn’t ready immediately
pub fn read_byte(&mut self) -> Result<u8, Error<Infallible>>
sourcepub fn listen_rx_packet_recv_interrupt(&mut self)
pub fn listen_rx_packet_recv_interrupt(&mut self)
Listen for RX-PACKET-RECV interrupts
sourcepub fn unlisten_rx_packet_recv_interrupt(&mut self)
pub fn unlisten_rx_packet_recv_interrupt(&mut self)
Stop listening for RX-PACKET-RECV interrupts
sourcepub fn rx_packet_recv_interrupt_set(&mut self) -> bool
pub fn rx_packet_recv_interrupt_set(&mut self) -> bool
Checks if RX-PACKET-RECV interrupt is set
sourcepub fn reset_rx_packet_recv_interrupt(&mut self)
pub fn reset_rx_packet_recv_interrupt(&mut self)
Reset RX-PACKET-RECV interrupt
Trait Implementations§
source§impl ErrorType for UsbSerialJtag<'_>
impl ErrorType for UsbSerialJtag<'_>
§type Error = Infallible
type Error = Infallible
Error type of all the IO operations on this type.
source§impl Read for UsbSerialJtag<'_>
impl Read for UsbSerialJtag<'_>
source§impl Write for UsbSerialJtag<'_>
impl Write for UsbSerialJtag<'_>
source§fn write(
&mut self,
buf: &[u8]
) -> Result<usize, <UsbSerialJtag<'_> as ErrorType>::Error>
fn write( &mut self, buf: &[u8] ) -> Result<usize, <UsbSerialJtag<'_> as ErrorType>::Error>
Write a buffer into this writer, returning how many bytes were written. Read more
source§fn flush(&mut self) -> Result<(), <UsbSerialJtag<'_> as ErrorType>::Error>
fn flush(&mut self) -> Result<(), <UsbSerialJtag<'_> as ErrorType>::Error>
Flush this output stream, blocking until all intermediately buffered contents reach their destination.
source§impl Write for UsbSerialJtag<'_>
impl Write for UsbSerialJtag<'_>
source§impl Read<u8> for UsbSerialJtag<'_>
impl Read<u8> for UsbSerialJtag<'_>
Auto Trait Implementations§
impl<'d> RefUnwindSafe for UsbSerialJtag<'d>
impl<'d> Send for UsbSerialJtag<'d>
impl<'d> Sync for UsbSerialJtag<'d>
impl<'d> Unpin for UsbSerialJtag<'d>
impl<'d> !UnwindSafe for UsbSerialJtag<'d>
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