diff options
Diffstat (limited to 'embassy-nxp/src/lib.rs')
| -rw-r--r-- | embassy-nxp/src/lib.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/embassy-nxp/src/lib.rs b/embassy-nxp/src/lib.rs index b2e910f7e..3fcb14b7e 100644 --- a/embassy-nxp/src/lib.rs +++ b/embassy-nxp/src/lib.rs | |||
| @@ -6,6 +6,8 @@ pub(crate) mod fmt; | |||
| 6 | pub mod gpio; | 6 | pub mod gpio; |
| 7 | #[cfg(feature = "lpc55")] | 7 | #[cfg(feature = "lpc55")] |
| 8 | pub mod pint; | 8 | pub mod pint; |
| 9 | #[cfg(feature = "lpc55")] | ||
| 10 | pub mod usart; | ||
| 9 | 11 | ||
| 10 | #[cfg(feature = "_time_driver")] | 12 | #[cfg(feature = "_time_driver")] |
| 11 | #[cfg_attr(feature = "time-driver-pit", path = "time_driver/pit.rs")] | 13 | #[cfg_attr(feature = "time-driver-pit", path = "time_driver/pit.rs")] |
| @@ -115,3 +117,21 @@ impl Iterator for BitIter { | |||
| 115 | } | 117 | } |
| 116 | } | 118 | } |
| 117 | } | 119 | } |
| 120 | |||
| 121 | trait SealedMode {} | ||
| 122 | |||
| 123 | /// UART mode. | ||
| 124 | #[allow(private_bounds)] | ||
| 125 | pub trait Mode: SealedMode {} | ||
| 126 | |||
| 127 | macro_rules! impl_mode { | ||
| 128 | ($name:ident) => { | ||
| 129 | impl SealedMode for $name {} | ||
| 130 | impl Mode for $name {} | ||
| 131 | }; | ||
| 132 | } | ||
| 133 | |||
| 134 | /// Blocking mode. | ||
| 135 | pub struct Blocking; | ||
| 136 | |||
| 137 | impl_mode!(Blocking); | ||
