Skip to content

Commit

Permalink
Merge pull request #22 from aurelj/features
Browse files Browse the repository at this point in the history
Allow compiling without any feature selected
  • Loading branch information
therealprof committed Nov 6, 2018
2 parents 9ffa66d + 5438f65 commit 00a10a4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 0 additions & 1 deletion Cargo.toml
Expand Up @@ -44,7 +44,6 @@ version = "0.2.2"
version = "0.3.2"

[features]
default = ["rt"]
rt = ["stm32f4/rt"]
stm32f401 = ["stm32f4/stm32f401"]
stm32f407 = ["stm32f4/stm32f407"]
Expand Down
8 changes: 8 additions & 0 deletions src/lib.rs 100644 → 100755
Expand Up @@ -26,13 +26,21 @@ pub use stm32f4::stm32f412 as stm32;
pub use stm32f4::stm32f429 as stm32;

// Enable use of interrupt macro
#[cfg(feature = "rt")]
pub use stm32f4::interrupt;

#[cfg(any(feature = "stm32f401", feature = "stm32f407", feature = "stm32f412", feature = "stm32f429"))]
pub mod delay;
#[cfg(any(feature = "stm32f401", feature = "stm32f407", feature = "stm32f412", feature = "stm32f429"))]
pub mod gpio;
#[cfg(any(feature = "stm32f401", feature = "stm32f407", feature = "stm32f412", feature = "stm32f429"))]
pub mod i2c;
#[cfg(any(feature = "stm32f401", feature = "stm32f407", feature = "stm32f412", feature = "stm32f429"))]
pub mod prelude;
#[cfg(any(feature = "stm32f401", feature = "stm32f407", feature = "stm32f412", feature = "stm32f429"))]
pub mod rcc;
#[cfg(any(feature = "stm32f401", feature = "stm32f407", feature = "stm32f412", feature = "stm32f429"))]
pub mod serial;
pub mod time;
#[cfg(any(feature = "stm32f401", feature = "stm32f407", feature = "stm32f412", feature = "stm32f429"))]
pub mod timer;

0 comments on commit 00a10a4

Please sign in to comment.