This commit is contained in:
parent
cce42e2fa5
commit
58e4a3a211
@ -13,6 +13,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
- Improve and fix SPI abstractions. Add new low level interface. The primary SPI constructor now
|
||||
only expects a configuration structure and the transfer configuration needs to be applied in a
|
||||
separate step.
|
||||
- Added an additional way to read the UART RX with IRQs. The module documentation provides
|
||||
more information.
|
||||
- Made the UART with IRQ API more flexible for future additions.
|
||||
|
||||
## Fixed
|
||||
|
||||
|
@ -691,6 +691,19 @@ pub enum IrqError {
|
||||
/// Serial receiver, using interrupts to offload reading to the hardware.
|
||||
///
|
||||
/// You can use [Rx::to_rx_with_irq] to convert a normal [Rx] structure into this structure.
|
||||
/// This structure provides two distinct ways to read the UART RX using interrupts. It should
|
||||
/// be noted that the interrupt service routine (ISR) still has to be provided by the user. However,
|
||||
/// this structure provides API calls which can be used inside the ISRs to simplify the reading
|
||||
/// of the UART.
|
||||
///
|
||||
/// 1. The first way simply empties the FIFO on an interrupt into a user provided buffer. You
|
||||
/// can simply use [Self::start] to prepare the peripheral and then call the
|
||||
/// [Self::irq_handler] in the interrupt service routine.
|
||||
/// 2. The second way reads packets bounded by a maximum size or a baudtick based timeout. You
|
||||
/// can use [Self::read_fixed_len_or_timeout_based_using_irq] to prepare the peripheral and
|
||||
/// then call the [Self::irq_handler_max_size_or_timeout_based] in the interrupt service
|
||||
/// routine. You have to call [Self::read_fixed_len_or_timeout_based_using_irq] in the ISR to
|
||||
/// start reading the next packet.
|
||||
pub struct RxWithIrq<Uart>(Rx<Uart>);
|
||||
|
||||
impl<Uart: Instance> RxWithIrq<Uart> {
|
||||
|
Loading…
Reference in New Issue
Block a user