aboutsummaryrefslogtreecommitdiff
path: root/embassy-mspm0/src/gpio.rs
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-mspm0/src/gpio.rs')
-rw-r--r--embassy-mspm0/src/gpio.rs24
1 files changed, 18 insertions, 6 deletions
diff --git a/embassy-mspm0/src/gpio.rs b/embassy-mspm0/src/gpio.rs
index 19a6230b6..738d51928 100644
--- a/embassy-mspm0/src/gpio.rs
+++ b/embassy-mspm0/src/gpio.rs
@@ -1119,24 +1119,36 @@ impl Iterator for BitIter {
1119 } 1119 }
1120} 1120}
1121 1121
1122// C110x has a dedicated interrupt just for GPIOA, as it does not have a GROUP1 interrupt. 1122// C110x and L110x have a dedicated interrupts just for GPIOA.
1123//
1124// These chips do not have a GROUP1 interrupt.
1123#[cfg(all(feature = "rt", any(mspm0c110x, mspm0l110x)))] 1125#[cfg(all(feature = "rt", any(mspm0c110x, mspm0l110x)))]
1124#[interrupt] 1126#[interrupt]
1125fn GPIOA() { 1127fn GPIOA() {
1126 gpioa_interrupt(); 1128 irq_handler(pac::GPIOA, &PORTA_WAKERS);
1127} 1129}
1128 1130
1129#[cfg(feature = "rt")] 1131// These symbols are weakly defined as DefaultHandler and are called by the interrupt group implementation.
1130pub(crate) fn gpioa_interrupt() { 1132//
1133// Defining these as no_mangle is required so that the linker will pick these over the default handler.
1134
1135#[cfg(all(feature = "rt", not(any(mspm0c110x, mspm0l110x))))]
1136#[no_mangle]
1137#[allow(non_snake_case)]
1138fn GPIOA() {
1131 irq_handler(pac::GPIOA, &PORTA_WAKERS); 1139 irq_handler(pac::GPIOA, &PORTA_WAKERS);
1132} 1140}
1133 1141
1134#[cfg(all(feature = "rt", gpio_pb))] 1142#[cfg(all(feature = "rt", gpio_pb))]
1135pub(crate) fn gpiob_interrupt() { 1143#[no_mangle]
1144#[allow(non_snake_case)]
1145fn GPIOB() {
1136 irq_handler(pac::GPIOB, &PORTB_WAKERS); 1146 irq_handler(pac::GPIOB, &PORTB_WAKERS);
1137} 1147}
1138 1148
1139#[cfg(all(feature = "rt", gpio_pc))] 1149#[cfg(all(feature = "rt", gpio_pc))]
1140pub(crate) fn gpioc_interrupt() { 1150#[allow(non_snake_case)]
1151#[no_mangle]
1152fn GPIOC() {
1141 irq_handler(pac::GPIOC, &PORTC_WAKERS); 1153 irq_handler(pac::GPIOC, &PORTC_WAKERS);
1142} 1154}