diff options
Diffstat (limited to 'embassy-mspm0/src/lib.rs')
| -rw-r--r-- | embassy-mspm0/src/lib.rs | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/embassy-mspm0/src/lib.rs b/embassy-mspm0/src/lib.rs index c43c81853..548fb33ca 100644 --- a/embassy-mspm0/src/lib.rs +++ b/embassy-mspm0/src/lib.rs | |||
| @@ -8,20 +8,23 @@ | |||
| 8 | )] | 8 | )] |
| 9 | #![doc = include_str!("../README.md")] | 9 | #![doc = include_str!("../README.md")] |
| 10 | 10 | ||
| 11 | // This mod MUST go first, so that the others see its macros. | 11 | // These mods MUST go first, so that the others see the macros. |
| 12 | pub(crate) mod fmt; | 12 | pub(crate) mod fmt; |
| 13 | |||
| 14 | // This must be declared early as well for | ||
| 15 | mod macros; | 13 | mod macros; |
| 16 | 14 | ||
| 17 | pub mod adc; | 15 | pub mod adc; |
| 18 | pub mod dma; | 16 | pub mod dma; |
| 19 | pub mod gpio; | 17 | pub mod gpio; |
| 18 | // TODO: I2C unicomm | ||
| 19 | #[cfg(not(unicomm))] | ||
| 20 | pub mod i2c; | 20 | pub mod i2c; |
| 21 | #[cfg(not(unicomm))] | ||
| 21 | pub mod i2c_target; | 22 | pub mod i2c_target; |
| 22 | #[cfg(any(mspm0g150x, mspm0g151x, mspm0g350x, mspm0g351x))] | 23 | #[cfg(any(mspm0g150x, mspm0g151x, mspm0g350x, mspm0g351x))] |
| 23 | pub mod mathacl; | 24 | pub mod mathacl; |
| 24 | pub mod timer; | 25 | pub mod timer; |
| 26 | // TODO: UART unicomm | ||
| 27 | #[cfg(not(unicomm))] | ||
| 25 | pub mod uart; | 28 | pub mod uart; |
| 26 | pub mod wwdt; | 29 | pub mod wwdt; |
| 27 | 30 | ||
| @@ -276,7 +279,7 @@ pub enum ResetCause { | |||
| 276 | /// WWDT0 violation | 279 | /// WWDT0 violation |
| 277 | BootrstWwdt0Violation, | 280 | BootrstWwdt0Violation, |
| 278 | /// WWDT1 violation (G-series only) | 281 | /// WWDT1 violation (G-series only) |
| 279 | #[cfg(any(mspm0g110x, mspm0g150x, mspm0g151x, mspm0g310x, mspm0g350x, mspm0g351x))] | 282 | #[cfg(any(mspm0g110x, mspm0g150x, mspm0g151x, mspm0g310x, mspm0g350x, mspm0g351x, mspm0g518x))] |
| 280 | SysrstWwdt1Violation, | 283 | SysrstWwdt1Violation, |
| 281 | /// BSL exit (if present) | 284 | /// BSL exit (if present) |
| 282 | SysrstBslExit, | 285 | SysrstBslExit, |
| @@ -326,7 +329,8 @@ pub fn read_reset_cause() -> Result<ResetCause, u8> { | |||
| 326 | mspm0g151x, | 329 | mspm0g151x, |
| 327 | mspm0g310x, | 330 | mspm0g310x, |
| 328 | mspm0g350x, | 331 | mspm0g350x, |
| 329 | mspm0g351x | 332 | mspm0g351x, |
| 333 | mspm0g518x, | ||
| 330 | )))] | 334 | )))] |
| 331 | Id::BOOTNONPMUPARITY => Ok(BootrstNonPmuParityFault), | 335 | Id::BOOTNONPMUPARITY => Ok(BootrstNonPmuParityFault), |
| 332 | Id::BOOTCLKFAIL => Ok(BootrstClockFault), | 336 | Id::BOOTCLKFAIL => Ok(BootrstClockFault), |
| @@ -335,7 +339,7 @@ pub fn read_reset_cause() -> Result<ResetCause, u8> { | |||
| 335 | Id::BOOTWWDT0 => Ok(BootrstWwdt0Violation), | 339 | Id::BOOTWWDT0 => Ok(BootrstWwdt0Violation), |
| 336 | Id::SYSBSLEXIT => Ok(SysrstBslExit), | 340 | Id::SYSBSLEXIT => Ok(SysrstBslExit), |
| 337 | Id::SYSBSLENTRY => Ok(SysrstBslEntry), | 341 | Id::SYSBSLENTRY => Ok(SysrstBslEntry), |
| 338 | #[cfg(any(mspm0g110x, mspm0g150x, mspm0g151x, mspm0g310x, mspm0g350x, mspm0g351x))] | 342 | #[cfg(any(mspm0g110x, mspm0g150x, mspm0g151x, mspm0g310x, mspm0g350x, mspm0g351x, mspm0g518x))] |
| 339 | Id::SYSWWDT1 => Ok(SysrstWwdt1Violation), | 343 | Id::SYSWWDT1 => Ok(SysrstWwdt1Violation), |
| 340 | #[cfg(not(any(mspm0c110x, mspm0c1105_c1106, mspm0g351x, mspm0g151x)))] | 344 | #[cfg(not(any(mspm0c110x, mspm0c1105_c1106, mspm0g351x, mspm0g151x)))] |
| 341 | Id::SYSFLASHECC => Ok(SysrstFlashEccError), | 345 | Id::SYSFLASHECC => Ok(SysrstFlashEccError), |
