diff options
| author | Dario Nieuwenhuis <[email protected]> | 2024-04-05 00:20:22 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2024-04-05 00:48:46 +0200 |
| commit | ab85eb4b60cd49ebcd43d2305f42327685f5e5a6 (patch) | |
| tree | 3c385a5703edcd1e791ec1934d3232dc4084ab2b /embassy-nrf/src/buffered_uarte.rs | |
| parent | 0e1208947e89ea60bd1b5c85e4deb79efb94d89a (diff) | |
nrf: remove mod sealed.
Diffstat (limited to 'embassy-nrf/src/buffered_uarte.rs')
| -rw-r--r-- | embassy-nrf/src/buffered_uarte.rs | 25 |
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 |
| 21 | pub use pac::uarte0::{baudrate::BAUDRATE_A as Baudrate, config::PARITY_A as Parity}; | 21 | pub use pac::uarte0::{baudrate::BAUDRATE_A as Baudrate, config::PARITY_A as Parity}; |
| 22 | 22 | ||
| 23 | use crate::gpio::sealed::Pin; | 23 | use crate::gpio::{AnyPin, Pin as GpioPin, PselBits, SealedPin}; |
| 24 | use crate::gpio::{AnyPin, Pin as GpioPin, PselBits}; | ||
| 25 | use crate::interrupt::typelevel::Interrupt; | 24 | use crate::interrupt::typelevel::Interrupt; |
| 26 | use crate::ppi::{ | 25 | use 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}; | |||
| 30 | use crate::uarte::{configure, drop_tx_rx, Config, Instance as UarteInstance}; | 29 | use crate::uarte::{configure, drop_tx_rx, Config, Instance as UarteInstance}; |
| 31 | use crate::{interrupt, pac, Peripheral}; | 30 | use crate::{interrupt, pac, Peripheral}; |
| 32 | 31 | ||
| 33 | mod sealed { | 32 | pub(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 | ||
| 56 | pub(crate) use sealed::State; | ||
| 57 | |||
| 58 | impl State { | 51 | impl State { |
| 59 | pub(crate) const fn new() -> Self { | 52 | pub(crate) const fn new() -> Self { |
| 60 | Self { | 53 | Self { |
