aboutsummaryrefslogtreecommitdiff
path: root/embassy-nrf/src/buffered_uarte.rs
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2024-04-05 00:20:22 +0200
committerDario Nieuwenhuis <[email protected]>2024-04-05 00:48:46 +0200
commitab85eb4b60cd49ebcd43d2305f42327685f5e5a6 (patch)
tree3c385a5703edcd1e791ec1934d3232dc4084ab2b /embassy-nrf/src/buffered_uarte.rs
parent0e1208947e89ea60bd1b5c85e4deb79efb94d89a (diff)
nrf: remove mod sealed.
Diffstat (limited to 'embassy-nrf/src/buffered_uarte.rs')
-rw-r--r--embassy-nrf/src/buffered_uarte.rs25
1 files changed, 9 insertions, 16 deletions
diff --git a/embassy-nrf/src/buffered_uarte.rs b/embassy-nrf/src/buffered_uarte.rs
index b04c96e09..385d4015e 100644
--- a/embassy-nrf/src/buffered_uarte.rs
+++ b/embassy-nrf/src/buffered_uarte.rs
@@ -20,8 +20,7 @@ use embassy_hal_internal::{into_ref, PeripheralRef};
20// Re-export SVD variants to allow user to directly set values 20// Re-export SVD variants to allow user to directly set values
21pub use pac::uarte0::{baudrate::BAUDRATE_A as Baudrate, config::PARITY_A as Parity}; 21pub use pac::uarte0::{baudrate::BAUDRATE_A as Baudrate, config::PARITY_A as Parity};
22 22
23use crate::gpio::sealed::Pin; 23use crate::gpio::{AnyPin, Pin as GpioPin, PselBits, SealedPin};
24use crate::gpio::{AnyPin, Pin as GpioPin, PselBits};
25use crate::interrupt::typelevel::Interrupt; 24use crate::interrupt::typelevel::Interrupt;
26use crate::ppi::{ 25use crate::ppi::{
27 self, AnyConfigurableChannel, AnyGroup, Channel, ConfigurableChannel, Event, Group, Ppi, PpiGroup, Task, 26 self, AnyConfigurableChannel, AnyGroup, Channel, ConfigurableChannel, Event, Group, Ppi, PpiGroup, Task,
@@ -30,19 +29,15 @@ use crate::timer::{Instance as TimerInstance, Timer};
30use crate::uarte::{configure, drop_tx_rx, Config, Instance as UarteInstance}; 29use crate::uarte::{configure, drop_tx_rx, Config, Instance as UarteInstance};
31use crate::{interrupt, pac, Peripheral}; 30use crate::{interrupt, pac, Peripheral};
32 31
33mod sealed { 32pub(crate) struct State {
34 use super::*; 33 tx_buf: RingBuffer,
35 34 tx_count: AtomicUsize,
36 pub struct State {
37 pub tx_buf: RingBuffer,
38 pub tx_count: AtomicUsize,
39 35
40 pub rx_buf: RingBuffer, 36 rx_buf: RingBuffer,
41 pub rx_started: AtomicBool, 37 rx_started: AtomicBool,
42 pub rx_started_count: AtomicU8, 38 rx_started_count: AtomicU8,
43 pub rx_ended_count: AtomicU8, 39 rx_ended_count: AtomicU8,
44 pub rx_ppi_ch: AtomicU8, 40 rx_ppi_ch: AtomicU8,
45 }
46} 41}
47 42
48/// UART error. 43/// UART error.
@@ -53,8 +48,6 @@ pub enum Error {
53 // No errors for now 48 // No errors for now
54} 49}
55 50
56pub(crate) use sealed::State;
57
58impl State { 51impl State {
59 pub(crate) const fn new() -> Self { 52 pub(crate) const fn new() -> Self {
60 Self { 53 Self {