Struct nrf52832_hal::uarte::Uarte [−][src]
pub struct Uarte<T>(_);
Expand description
Interface to a UARTE instance.
This is a very basic interface that comes with the following limitations:
- The UARTE instances share the same address space with instances of UART.
You need to make sure that conflicting instances
are disabled before using
Uarte
. See product specification:- nrf52832: Section 15.2
- nrf52840: Section 6.1.2
Implementations
Write via UARTE.
This method uses transmits all bytes in tx_buffer
.
The buffer must have a length of at most 255 bytes on the nRF52832 and at most 65535 bytes on the nRF52840.
Read via UARTE.
This method fills all bytes in rx_buffer
, and blocks
until the buffer is full.
The buffer must have a length of at most 255 bytes.
Read via UARTE.
This method fills all bytes in rx_buffer
, and blocks
until the buffer is full or the timeout expires, whichever
comes first.
If the timeout occurs, an Error::Timeout(n)
will be returned,
where n
is the number of bytes read successfully.
This method assumes the interrupt for the given timer is NOT enabled, and in cases where a timeout does NOT occur, the timer will be left running until completion.
The buffer must have a length of at most 255 bytes.
Split into implementations of embedded_hal::serial traits.
The size of the tx_buf
slice passed to this method will determine
the size of the DMA transfers performed.
The rx_buf
slice is an array of size 1 since the embedded_hal
traits only allow reading one byte at a time.
Trait Implementations
Writes a string slice into this writer, returning whether the write succeeded. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for Uarte<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for Uarte<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Casts the value.
Casts the value.
Performs the conversion.
Performs the conversion.
Casts the value.
OverflowingCasts the value.
Casts the value.
Casts the value.
Casts the value.
UnwrappedCasts the value.
Casts the value.
WrappingCasts the value.