Skip to content

Commit 344e78b

Browse files
committed
Add some docs and restart tx/rxstarted on UARTE drop()
1 parent 8688eb6 commit 344e78b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

nrf-hal-common/src/uarte.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,11 @@ where
270270
)
271271
}
272272

273-
/// Split into implementations of embedded_hal::serial traits. The size of the slices passed to this
274-
/// method will determine the size of the DMA transfers performed.
273+
/// Split into implementations of embedded_hal::serial traits.
274+
/// The size of the `tx_buf` slice passed to this method will determine
275+
/// the size of the DMA transfers performed.
276+
/// The `rx_buf` slice is an array of size 1 since the embedded_hal
277+
/// traits only allow reading one byte at a time.
275278
pub fn split(
276279
self,
277280
tx_buf: &'static mut [u8],
@@ -541,6 +544,7 @@ where
541544
// Reset events
542545
uarte.events_endtx.reset();
543546
uarte.events_txstopped.reset();
547+
uarte.events_txstarted.reset();
544548

545549
// Ensure the above is done
546550
compiler_fence(SeqCst);
@@ -562,6 +566,7 @@ where
562566

563567
// Reset events
564568
uarte.events_endrx.reset();
569+
uarte.events_rxstarted.reset();
565570

566571
// Ensure the above is done
567572
compiler_fence(SeqCst);

0 commit comments

Comments
 (0)