diff options
| author | Roi Bachynskyi <[email protected]> | 2025-08-02 20:45:01 +0300 |
|---|---|---|
| committer | Roi Bachynskyi <[email protected]> | 2025-08-12 08:49:49 +0300 |
| commit | f3f819fc37720c1cbe24834df255cae9bfe68eb9 (patch) | |
| tree | 0e953e4129603079fdc2dda8f7a92c0639ced1c8 /embassy-nxp/src/lib.rs | |
| parent | cae93c5a27d596c9371b81c896598ce1a7fdaa83 (diff) | |
feat: lpc55 blocking usart added
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); | ||
