diff options
| author | i509VCB <[email protected]> | 2025-08-28 15:00:46 -0500 |
|---|---|---|
| committer | i509VCB <[email protected]> | 2025-08-28 15:03:50 -0500 |
| commit | 338227c21abea9621887ed428c2272d7bdeeafdd (patch) | |
| tree | 2de4e3ab189c70b88049be6974c2f947808a428e /embassy-mspm0/src | |
| parent | d3c84ee1d34329e61464c9acbedab74e9076ac0d (diff) | |
mspm0: add mspm0c1105/6
Diffstat (limited to 'embassy-mspm0/src')
| -rw-r--r-- | embassy-mspm0/src/gpio.rs | 14 | ||||
| -rw-r--r-- | embassy-mspm0/src/i2c.rs | 2 |
2 files changed, 11 insertions, 5 deletions
diff --git a/embassy-mspm0/src/gpio.rs b/embassy-mspm0/src/gpio.rs index f77848888..d5fd36dbf 100644 --- a/embassy-mspm0/src/gpio.rs +++ b/embassy-mspm0/src/gpio.rs | |||
| @@ -10,7 +10,7 @@ use embassy_sync::waitqueue::AtomicWaker; | |||
| 10 | 10 | ||
| 11 | use crate::pac::gpio::vals::*; | 11 | use crate::pac::gpio::vals::*; |
| 12 | use crate::pac::gpio::{self}; | 12 | use crate::pac::gpio::{self}; |
| 13 | #[cfg(all(feature = "rt", any(mspm0c110x, mspm0l110x)))] | 13 | #[cfg(all(feature = "rt", any(mspm0c110x, mspm0c1105_c1106, mspm0l110x)))] |
| 14 | use crate::pac::interrupt; | 14 | use crate::pac::interrupt; |
| 15 | use crate::pac::{self}; | 15 | use crate::pac::{self}; |
| 16 | 16 | ||
| @@ -1108,24 +1108,30 @@ fn irq_handler(gpio: gpio::Gpio, wakers: &[AtomicWaker; 32]) { | |||
| 1108 | // C110x and L110x have a dedicated interrupts just for GPIOA. | 1108 | // C110x and L110x have a dedicated interrupts just for GPIOA. |
| 1109 | // | 1109 | // |
| 1110 | // These chips do not have a GROUP1 interrupt. | 1110 | // These chips do not have a GROUP1 interrupt. |
| 1111 | #[cfg(all(feature = "rt", any(mspm0c110x, mspm0l110x)))] | 1111 | #[cfg(all(feature = "rt", any(mspm0c110x, mspm0c1105_c1106, mspm0l110x)))] |
| 1112 | #[interrupt] | 1112 | #[interrupt] |
| 1113 | fn GPIOA() { | 1113 | fn GPIOA() { |
| 1114 | irq_handler(pac::GPIOA, &PORTA_WAKERS); | 1114 | irq_handler(pac::GPIOA, &PORTA_WAKERS); |
| 1115 | } | 1115 | } |
| 1116 | 1116 | ||
| 1117 | #[cfg(all(feature = "rt", mspm0c1105_c1106))] | ||
| 1118 | #[interrupt] | ||
| 1119 | fn GPIOB() { | ||
| 1120 | irq_handler(pac::GPIOB, &PORTB_WAKERS); | ||
| 1121 | } | ||
| 1122 | |||
| 1117 | // These symbols are weakly defined as DefaultHandler and are called by the interrupt group implementation. | 1123 | // These symbols are weakly defined as DefaultHandler and are called by the interrupt group implementation. |
| 1118 | // | 1124 | // |
| 1119 | // Defining these as no_mangle is required so that the linker will pick these over the default handler. | 1125 | // Defining these as no_mangle is required so that the linker will pick these over the default handler. |
| 1120 | 1126 | ||
| 1121 | #[cfg(all(feature = "rt", not(any(mspm0c110x, mspm0l110x))))] | 1127 | #[cfg(all(feature = "rt", not(any(mspm0c110x, mspm0c1105_c1106, mspm0l110x))))] |
| 1122 | #[no_mangle] | 1128 | #[no_mangle] |
| 1123 | #[allow(non_snake_case)] | 1129 | #[allow(non_snake_case)] |
| 1124 | fn GPIOA() { | 1130 | fn GPIOA() { |
| 1125 | irq_handler(pac::GPIOA, &PORTA_WAKERS); | 1131 | irq_handler(pac::GPIOA, &PORTA_WAKERS); |
| 1126 | } | 1132 | } |
| 1127 | 1133 | ||
| 1128 | #[cfg(all(feature = "rt", gpio_pb))] | 1134 | #[cfg(all(feature = "rt", gpio_pb, not(mspm0c1105_c1106)))] |
| 1129 | #[no_mangle] | 1135 | #[no_mangle] |
| 1130 | #[allow(non_snake_case)] | 1136 | #[allow(non_snake_case)] |
| 1131 | fn GPIOB() { | 1137 | fn GPIOB() { |
diff --git a/embassy-mspm0/src/i2c.rs b/embassy-mspm0/src/i2c.rs index 7e22bb724..1906e37ba 100644 --- a/embassy-mspm0/src/i2c.rs +++ b/embassy-mspm0/src/i2c.rs | |||
| @@ -195,7 +195,7 @@ impl Config { | |||
| 195 | .unwrap(); | 195 | .unwrap(); |
| 196 | } | 196 | } |
| 197 | 197 | ||
| 198 | #[cfg(any(mspm0c110x))] | 198 | #[cfg(any(mspm0c110x, mspm0c1105_c1106))] |
| 199 | fn calculate_clock_source(&self) -> u32 { | 199 | fn calculate_clock_source(&self) -> u32 { |
| 200 | // Assume that BusClk has default value. | 200 | // Assume that BusClk has default value. |
| 201 | // TODO: calculate BusClk more precisely. | 201 | // TODO: calculate BusClk more precisely. |
