Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow compiling without any feature selected #22

Merged
merged 3 commits into from Nov 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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;