mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-23 20:22:51 +01:00
ci: Add v6 uitest feature
This commit is contained in:
parent
ebd35b89a4
commit
62e687242a
3 changed files with 18 additions and 11 deletions
|
@ -74,7 +74,8 @@ thumbv8main-backend = ["rtic-macros/cortex-m-basepri"]
|
||||||
# riscv-esp32c3-backend = ["rtic-macros/riscv-esp32c3"]
|
# riscv-esp32c3-backend = ["rtic-macros/riscv-esp32c3"]
|
||||||
|
|
||||||
# needed for testing
|
# needed for testing
|
||||||
rtic-uitest = ["thumbv7-backend","rtic-macros/cortex-m-basepri"]
|
rtic-uitestv7 = ["thumbv7-backend", "rtic-macros/cortex-m-basepri"]
|
||||||
|
rtic-uitestv6 = ["thumbv6-backend", "rtic-macros/cortex-m-source-masking"]
|
||||||
test-critical-section = ["cortex-m/critical-section-single-core", "rtic-monotonics/systick-100hz"]
|
test-critical-section = ["cortex-m/critical-section-single-core", "rtic-monotonics/systick-100hz"]
|
||||||
|
|
||||||
# [[example]]
|
# [[example]]
|
||||||
|
|
|
@ -20,23 +20,24 @@ compile_error!(
|
||||||
"Building for Cortex-M with source masking, but 'thumbv6-backend' or 'thumbv8base-backend' backend not selected"
|
"Building for Cortex-M with source masking, but 'thumbv6-backend' or 'thumbv8base-backend' backend not selected"
|
||||||
);
|
);
|
||||||
|
|
||||||
#[cfg(any(feature = "cortex-m-basepri", feature = "rtic-uitest"))]
|
#[cfg(any(feature = "cortex-m-basepri", feature = "rtic-uitestv7"))]
|
||||||
pub use cortex_basepri::*;
|
pub use cortex_basepri::*;
|
||||||
|
|
||||||
#[cfg(any(feature = "cortex-m-basepri", feature = "rtic-uitest"))]
|
#[cfg(any(feature = "cortex-m-basepri", feature = "rtic-uitestv7"))]
|
||||||
mod cortex_basepri;
|
mod cortex_basepri;
|
||||||
|
|
||||||
#[cfg(feature = "cortex-m-source-masking")]
|
#[cfg(any(feature = "cortex-m-source-masking", feature = "rtic-uitestv6"))]
|
||||||
pub use cortex_source_mask::*;
|
pub use cortex_source_mask::*;
|
||||||
|
|
||||||
#[cfg(feature = "cortex-m-source-masking")]
|
#[cfg(any(feature = "cortex-m-source-masking", feature = "rtic-uitestv6"))]
|
||||||
mod cortex_source_mask;
|
mod cortex_source_mask;
|
||||||
|
|
||||||
/// Priority conversion, takes logical priorities 1..=N and converts it to NVIC priority.
|
/// Priority conversion, takes logical priorities 1..=N and converts it to NVIC priority.
|
||||||
#[cfg(any(
|
#[cfg(any(
|
||||||
feature = "cortex-m-basepri",
|
feature = "cortex-m-basepri",
|
||||||
feature = "cortex-m-source-masking",
|
feature = "cortex-m-source-masking",
|
||||||
feature = "rtic-uitest",
|
feature = "rtic-uitestv6",
|
||||||
|
feature = "rtic-uitestv7",
|
||||||
))]
|
))]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
|
|
|
@ -41,7 +41,7 @@ impl TestMetadata {
|
||||||
"{},{},{}",
|
"{},{},{}",
|
||||||
DEFAULT_FEATURES,
|
DEFAULT_FEATURES,
|
||||||
backend.to_rtic_feature(),
|
backend.to_rtic_feature(),
|
||||||
"rtic-uitest"
|
backend.to_rtic_uitest_feature(),
|
||||||
));
|
));
|
||||||
CargoCommand::Test {
|
CargoCommand::Test {
|
||||||
package: Some(package),
|
package: Some(package),
|
||||||
|
@ -110,10 +110,15 @@ impl Backends {
|
||||||
#[allow(clippy::wrong_self_convention)]
|
#[allow(clippy::wrong_self_convention)]
|
||||||
pub fn to_rtic_macros_feature(&self) -> &str {
|
pub fn to_rtic_macros_feature(&self) -> &str {
|
||||||
match self {
|
match self {
|
||||||
Backends::Thumbv6 => "cortex-m-source-masking",
|
Backends::Thumbv6 | Backends::Thumbv8Base => "cortex-m-source-masking",
|
||||||
Backends::Thumbv7 => "cortex-m-basepri",
|
Backends::Thumbv7 | Backends::Thumbv8Main => "cortex-m-basepri",
|
||||||
Backends::Thumbv8Base => "cortex-m-source-masking",
|
}
|
||||||
Backends::Thumbv8Main => "cortex-m-basepri",
|
}
|
||||||
|
#[allow(clippy::wrong_self_convention)]
|
||||||
|
pub fn to_rtic_uitest_feature(&self) -> &str {
|
||||||
|
match self {
|
||||||
|
Backends::Thumbv6 | Backends::Thumbv8Base => "rtic-uitestv6",
|
||||||
|
Backends::Thumbv7 | Backends::Thumbv8Main => "rtic-uitestv7",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue