mspm0: fix build for int groups.
This commit is contained in:
parent
f820eb2eba
commit
ef32187ed7
7
ci.sh
7
ci.sh
@ -179,6 +179,13 @@ cargo batch \
|
|||||||
--- build --release --manifest-path embassy-mspm0/Cargo.toml --target thumbv6m-none-eabi --features mspm0g3519pz,defmt,time-driver-any \
|
--- build --release --manifest-path embassy-mspm0/Cargo.toml --target thumbv6m-none-eabi --features mspm0g3519pz,defmt,time-driver-any \
|
||||||
--- build --release --manifest-path embassy-mspm0/Cargo.toml --target thumbv6m-none-eabi --features mspm0l1306rhb,defmt,time-driver-any \
|
--- build --release --manifest-path embassy-mspm0/Cargo.toml --target thumbv6m-none-eabi --features mspm0l1306rhb,defmt,time-driver-any \
|
||||||
--- build --release --manifest-path embassy-mspm0/Cargo.toml --target thumbv6m-none-eabi --features mspm0l2228pn,defmt,time-driver-any \
|
--- build --release --manifest-path embassy-mspm0/Cargo.toml --target thumbv6m-none-eabi --features mspm0l2228pn,defmt,time-driver-any \
|
||||||
|
--- build --release --manifest-path embassy-mspm0/Cargo.toml --target thumbv6m-none-eabi --features mspm0l1345dgs28,defmt,time-driver-any \
|
||||||
|
--- build --release --manifest-path embassy-mspm0/Cargo.toml --target thumbv6m-none-eabi --features mspm0l1106dgs28,defmt,time-driver-any \
|
||||||
|
--- build --release --manifest-path embassy-mspm0/Cargo.toml --target thumbv6m-none-eabi --features mspm0l1228pm,defmt,time-driver-any \
|
||||||
|
--- build --release --manifest-path embassy-mspm0/Cargo.toml --target thumbv6m-none-eabi --features mspm0g1107ycj,defmt,time-driver-any \
|
||||||
|
--- build --release --manifest-path embassy-mspm0/Cargo.toml --target thumbv6m-none-eabi --features mspm0g3105rhb,defmt,time-driver-any \
|
||||||
|
--- build --release --manifest-path embassy-mspm0/Cargo.toml --target thumbv6m-none-eabi --features mspm0g1505pt,defmt,time-driver-any \
|
||||||
|
--- build --release --manifest-path embassy-mspm0/Cargo.toml --target thumbv6m-none-eabi --features mspm0g1519rhb,defmt,time-driver-any \
|
||||||
--- build --release --manifest-path cyw43/Cargo.toml --target thumbv6m-none-eabi --features ''\
|
--- build --release --manifest-path cyw43/Cargo.toml --target thumbv6m-none-eabi --features ''\
|
||||||
--- build --release --manifest-path cyw43/Cargo.toml --target thumbv6m-none-eabi --features 'log' \
|
--- build --release --manifest-path cyw43/Cargo.toml --target thumbv6m-none-eabi --features 'log' \
|
||||||
--- build --release --manifest-path cyw43/Cargo.toml --target thumbv6m-none-eabi --features 'defmt' \
|
--- build --release --manifest-path cyw43/Cargo.toml --target thumbv6m-none-eabi --features 'defmt' \
|
||||||
|
|||||||
@ -84,6 +84,10 @@ fn get_chip_cfgs(chip_name: &str) -> Vec<String> {
|
|||||||
cfgs.push("mspm0g150x".to_string());
|
cfgs.push("mspm0g150x".to_string());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if chip_name.starts_with("mspm0g151") {
|
||||||
|
cfgs.push("mspm0g151x".to_string());
|
||||||
|
}
|
||||||
|
|
||||||
if chip_name.starts_with("mspm0g310") {
|
if chip_name.starts_with("mspm0g310") {
|
||||||
cfgs.push("mspm0g310x".to_string());
|
cfgs.push("mspm0g310x".to_string());
|
||||||
}
|
}
|
||||||
|
|||||||
47
embassy-mspm0/src/int_group/g110x.rs
Normal file
47
embassy-mspm0/src/int_group/g110x.rs
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
use crate::pac;
|
||||||
|
use crate::pac::interrupt;
|
||||||
|
|
||||||
|
#[cfg(feature = "rt")]
|
||||||
|
#[interrupt]
|
||||||
|
fn GROUP0() {
|
||||||
|
use mspm0_metapac::Group0;
|
||||||
|
|
||||||
|
let group = pac::CPUSS.int_group(0);
|
||||||
|
|
||||||
|
// Must subtract by 1 since NO_INTR is value 0
|
||||||
|
let iidx = group.iidx().read().stat().to_bits() - 1;
|
||||||
|
|
||||||
|
let Ok(group) = pac::Group0::try_from(iidx as u8) else {
|
||||||
|
debug!("Invalid IIDX for group 0: {}", iidx);
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
|
||||||
|
match group {
|
||||||
|
Group0::WWDT0 => todo!("implement WWDT0"),
|
||||||
|
Group0::WWDT1 => todo!("implement WWDT1"),
|
||||||
|
Group0::DEBUGSS => todo!("implement DEBUGSS"),
|
||||||
|
Group0::FLASHCTL => todo!("implement FLASHCTL"),
|
||||||
|
Group0::SYSCTL => todo!("implement SYSCTL"),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "rt")]
|
||||||
|
#[interrupt]
|
||||||
|
fn GROUP1() {
|
||||||
|
use mspm0_metapac::Group1;
|
||||||
|
|
||||||
|
let group = pac::CPUSS.int_group(1);
|
||||||
|
|
||||||
|
// Must subtract by 1 since NO_INTR is value 0
|
||||||
|
let iidx = group.iidx().read().stat().to_bits() - 1;
|
||||||
|
|
||||||
|
let Ok(group) = pac::Group1::try_from(iidx as u8) else {
|
||||||
|
debug!("Invalid IIDX for group 1: {}", iidx);
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
|
||||||
|
match group {
|
||||||
|
Group1::GPIOA => crate::gpio::gpioa_interrupt(),
|
||||||
|
Group1::GPIOB => crate::gpio::gpiob_interrupt(),
|
||||||
|
}
|
||||||
|
}
|
||||||
52
embassy-mspm0/src/int_group/g151x.rs
Normal file
52
embassy-mspm0/src/int_group/g151x.rs
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
use crate::pac;
|
||||||
|
use crate::pac::interrupt;
|
||||||
|
|
||||||
|
#[cfg(feature = "rt")]
|
||||||
|
#[interrupt]
|
||||||
|
fn GROUP0() {
|
||||||
|
use mspm0_metapac::Group0;
|
||||||
|
|
||||||
|
let group = pac::CPUSS.int_group(0);
|
||||||
|
|
||||||
|
// Must subtract by 1 since NO_INTR is value 0
|
||||||
|
let iidx = group.iidx().read().stat().to_bits() - 1;
|
||||||
|
|
||||||
|
let Ok(group) = pac::Group0::try_from(iidx as u8) else {
|
||||||
|
debug!("Invalid IIDX for group 0: {}", iidx);
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
|
||||||
|
match group {
|
||||||
|
Group0::WWDT0 => todo!("implement WWDT0"),
|
||||||
|
Group0::WWDT1 => todo!("implement WWDT1"),
|
||||||
|
Group0::DEBUGSS => todo!("implement DEBUGSS"),
|
||||||
|
Group0::FLASHCTL => todo!("implement FLASHCTL"),
|
||||||
|
Group0::SYSCTL => todo!("implement SYSCTL"),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "rt")]
|
||||||
|
#[interrupt]
|
||||||
|
fn GROUP1() {
|
||||||
|
use mspm0_metapac::Group1;
|
||||||
|
|
||||||
|
let group = pac::CPUSS.int_group(1);
|
||||||
|
|
||||||
|
// Must subtract by 1 since NO_INTR is value 0
|
||||||
|
let iidx = group.iidx().read().stat().to_bits() - 1;
|
||||||
|
|
||||||
|
let Ok(group) = pac::Group1::try_from(iidx as u8) else {
|
||||||
|
debug!("Invalid IIDX for group 1: {}", iidx);
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
|
||||||
|
match group {
|
||||||
|
Group1::GPIOA => crate::gpio::gpioa_interrupt(),
|
||||||
|
Group1::GPIOB => crate::gpio::gpiob_interrupt(),
|
||||||
|
Group1::COMP0 => todo!("implement COMP0"),
|
||||||
|
Group1::COMP1 => todo!("implement COMP1"),
|
||||||
|
Group1::COMP2 => todo!("implement COMP2"),
|
||||||
|
Group1::TRNG => todo!("implement TRNG"),
|
||||||
|
Group1::GPIOC => crate::gpio::gpioc_interrupt(),
|
||||||
|
}
|
||||||
|
}
|
||||||
48
embassy-mspm0/src/int_group/g310x.rs
Normal file
48
embassy-mspm0/src/int_group/g310x.rs
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
use crate::pac;
|
||||||
|
use crate::pac::interrupt;
|
||||||
|
|
||||||
|
#[cfg(feature = "rt")]
|
||||||
|
#[interrupt]
|
||||||
|
fn GROUP0() {
|
||||||
|
use mspm0_metapac::Group0;
|
||||||
|
|
||||||
|
let group = pac::CPUSS.int_group(0);
|
||||||
|
|
||||||
|
// Must subtract by 1 since NO_INTR is value 0
|
||||||
|
let iidx = group.iidx().read().stat().to_bits() - 1;
|
||||||
|
|
||||||
|
let Ok(group) = pac::Group0::try_from(iidx as u8) else {
|
||||||
|
debug!("Invalid IIDX for group 0: {}", iidx);
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
|
||||||
|
match group {
|
||||||
|
Group0::WWDT0 => todo!("implement WWDT0"),
|
||||||
|
Group0::WWDT1 => todo!("implement WWDT1"),
|
||||||
|
Group0::DEBUGSS => todo!("implement DEBUGSS"),
|
||||||
|
Group0::FLASHCTL => todo!("implement FLASHCTL"),
|
||||||
|
Group0::SYSCTL => todo!("implement SYSCTL"),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "rt")]
|
||||||
|
#[interrupt]
|
||||||
|
fn GROUP1() {
|
||||||
|
use mspm0_metapac::Group1;
|
||||||
|
|
||||||
|
let group = pac::CPUSS.int_group(1);
|
||||||
|
|
||||||
|
// Must subtract by 1 since NO_INTR is value 0
|
||||||
|
let iidx = group.iidx().read().stat().to_bits() - 1;
|
||||||
|
|
||||||
|
let Ok(group) = pac::Group1::try_from(iidx as u8) else {
|
||||||
|
debug!("Invalid IIDX for group 1: {}", iidx);
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
|
||||||
|
match group {
|
||||||
|
Group1::GPIOA => crate::gpio::gpioa_interrupt(),
|
||||||
|
Group1::GPIOB => crate::gpio::gpiob_interrupt(),
|
||||||
|
Group1::TRNG => todo!("implement TRNG"),
|
||||||
|
}
|
||||||
|
}
|
||||||
25
embassy-mspm0/src/int_group/l11xx.rs
Normal file
25
embassy-mspm0/src/int_group/l11xx.rs
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
use crate::pac;
|
||||||
|
use crate::pac::interrupt;
|
||||||
|
|
||||||
|
#[cfg(feature = "rt")]
|
||||||
|
#[interrupt]
|
||||||
|
fn GROUP0() {
|
||||||
|
use mspm0_metapac::Group0;
|
||||||
|
|
||||||
|
let group = pac::CPUSS.int_group(0);
|
||||||
|
|
||||||
|
// Must subtract by 1 since NO_INTR is value 0
|
||||||
|
let iidx = group.iidx().read().stat().to_bits() - 1;
|
||||||
|
|
||||||
|
let Ok(group) = pac::Group0::try_from(iidx as u8) else {
|
||||||
|
debug!("Invalid IIDX for group 0: {}", iidx);
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
|
||||||
|
match group {
|
||||||
|
Group0::WWDT0 => todo!("implement WWDT0"),
|
||||||
|
Group0::DEBUGSS => todo!("implement DEBUGSS"),
|
||||||
|
Group0::FLASHCTL => todo!("implement FLASHCTL"),
|
||||||
|
Group0::SYSCTL => todo!("implement SYSCTL"),
|
||||||
|
}
|
||||||
|
}
|
||||||
49
embassy-mspm0/src/int_group/l12xx.rs
Normal file
49
embassy-mspm0/src/int_group/l12xx.rs
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
use crate::pac;
|
||||||
|
use crate::pac::interrupt;
|
||||||
|
|
||||||
|
#[cfg(feature = "rt")]
|
||||||
|
#[interrupt]
|
||||||
|
fn GROUP0() {
|
||||||
|
use mspm0_metapac::Group0;
|
||||||
|
|
||||||
|
let group = pac::CPUSS.int_group(0);
|
||||||
|
|
||||||
|
// Must subtract by 1 since NO_INTR is value 0
|
||||||
|
let iidx = group.iidx().read().stat().to_bits() - 1;
|
||||||
|
|
||||||
|
let Ok(group) = pac::Group0::try_from(iidx as u8) else {
|
||||||
|
debug!("Invalid IIDX for group 0: {}", iidx);
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
|
||||||
|
match group {
|
||||||
|
Group0::WWDT0 => todo!("implement WWDT0"),
|
||||||
|
Group0::DEBUGSS => todo!("implement DEBUGSS"),
|
||||||
|
Group0::FLASHCTL => todo!("implement FLASHCTL"),
|
||||||
|
Group0::SYSCTL => todo!("implement SYSCTL"),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "rt")]
|
||||||
|
#[interrupt]
|
||||||
|
fn GROUP1() {
|
||||||
|
use mspm0_metapac::Group1;
|
||||||
|
|
||||||
|
let group = pac::CPUSS.int_group(1);
|
||||||
|
|
||||||
|
// Must subtract by 1 since NO_INTR is value 0
|
||||||
|
let iidx = group.iidx().read().stat().to_bits() - 1;
|
||||||
|
|
||||||
|
let Ok(group) = pac::Group1::try_from(iidx as u8) else {
|
||||||
|
debug!("Invalid IIDX for group 1: {}", iidx);
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
|
||||||
|
match group {
|
||||||
|
Group1::GPIOA => crate::gpio::gpioa_interrupt(),
|
||||||
|
Group1::GPIOB => todo!("implement GPIOB"),
|
||||||
|
Group1::COMP0 => todo!("implement COMP0"),
|
||||||
|
Group1::TRNG => todo!("implement TRNG"),
|
||||||
|
Group1::GPIOC => todo!("implement GPIOC"),
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -41,9 +41,15 @@ mod time_driver;
|
|||||||
|
|
||||||
// Interrupt group handlers.
|
// Interrupt group handlers.
|
||||||
#[cfg_attr(mspm0c110x, path = "int_group/c110x.rs")]
|
#[cfg_attr(mspm0c110x, path = "int_group/c110x.rs")]
|
||||||
|
#[cfg_attr(mspm0g110x, path = "int_group/g110x.rs")]
|
||||||
|
#[cfg_attr(mspm0g150x, path = "int_group/g150x.rs")]
|
||||||
#[cfg_attr(mspm0g350x, path = "int_group/g350x.rs")]
|
#[cfg_attr(mspm0g350x, path = "int_group/g350x.rs")]
|
||||||
|
#[cfg_attr(mspm0g151x, path = "int_group/g151x.rs")]
|
||||||
#[cfg_attr(mspm0g351x, path = "int_group/g351x.rs")]
|
#[cfg_attr(mspm0g351x, path = "int_group/g351x.rs")]
|
||||||
#[cfg_attr(mspm0l130x, path = "int_group/l130x.rs")]
|
#[cfg_attr(mspm0g310x, path = "int_group/g310x.rs")]
|
||||||
|
#[cfg_attr(mspm0l110x, path = "int_group/l11xx.rs")]
|
||||||
|
#[cfg_attr(mspm0l122x, path = "int_group/l12xx.rs")]
|
||||||
|
#[cfg_attr(any(mspm0l130x, mspm0l134x), path = "int_group/l13xx.rs")]
|
||||||
#[cfg_attr(mspm0l222x, path = "int_group/l222x.rs")]
|
#[cfg_attr(mspm0l222x, path = "int_group/l222x.rs")]
|
||||||
mod int_group;
|
mod int_group;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user