Skip to content

Commit 8fc2df4

Browse files
committed
Add some docs and restart tx/rxstarted on UARTE drop()
1 parent 883680c commit 8fc2df4

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
@@ -307,8 +307,11 @@ where
307307
)
308308
}
309309

310-
/// Split into implementations of embedded_hal::serial traits. The size of the slices passed to this
311-
/// method will determine the size of the DMA transfers performed.
310+
/// Split into implementations of embedded_hal::serial traits.
311+
/// The size of the `tx_buf` slice passed to this method will determine
312+
/// the size of the DMA transfers performed.
313+
/// The `rx_buf` slice is an array of size 1 since the embedded_hal
314+
/// traits only allow reading one byte at a time.
312315
pub fn split(
313316
self,
314317
tx_buf: &'static mut [u8],
@@ -578,6 +581,7 @@ where
578581
// Reset events
579582
uarte.events_endtx.reset();
580583
uarte.events_txstopped.reset();
584+
uarte.events_txstarted.reset();
581585

582586
// Ensure the above is done
583587
compiler_fence(SeqCst);
@@ -599,6 +603,7 @@ where
599603

600604
// Reset events
601605
uarte.events_endrx.reset();
606+
uarte.events_rxstarted.reset();
602607

603608
// Ensure the above is done
604609
compiler_fence(SeqCst);

0 commit comments

Comments
 (0)