Skip to content

Commit

Permalink
Updated default feature handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-terrell committed Sep 27, 2020
1 parent a9054bf commit a4fe7ab
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ version = "1.0.2"
default-features = false

[features]
default = ["atsam4e16e"]
atsam4e = []
atsam4e16e = ["atsam4e", "atsam4e16e-pac", "atsam4e16e-pac/rt"]
atsam4s = []
Expand Down
2 changes: 1 addition & 1 deletion ci/script.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set -ex

main() {
cargo check --target $TARGET --features $FEATURES
cargo check --target $TARGET --no-default-features --features $FEATURES

if [ $TARGET = x86_64-unknown-linux-gnu ]; then
cargo clean
Expand Down
16 changes: 4 additions & 12 deletions src/static_memory_controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,26 +219,18 @@ pub struct StaticMemoryController {
pub chip_select3: ChipSelect3<Uninitialized>,
}

#[cfg(feature = "atsam4e")]
pub enum NCS1 {
C15(Pc15<PfA>),

#[cfg(feature = "atsam4e")]
D18(Pd18<PfA>),
}

#[cfg(feature = "atsam4e")]
pub enum NCS3 {
C12(Pc12<PfA>),
D19(Pd19<PfA>),
}

#[cfg(feature = "atsam4s")]
pub enum NCS1 {
C15(Pc15<PfA>),
}

#[cfg(feature = "atsam4s")]
pub enum NCS3 {
C12(Pc12<PfA>),
#[cfg(feature = "atsam4e")]
D19(Pd19<PfA>),
}

impl StaticMemoryController {
Expand Down

0 comments on commit a4fe7ab

Please sign in to comment.