Skip to content

Commit

Permalink
update stm32g0 dependency and add new chip variant features
Browse files Browse the repository at this point in the history
  • Loading branch information
dimpolo authored and stillinbeta committed Dec 1, 2022
1 parent 83dd084 commit d168689
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 4 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,18 @@ jobs:
- stable
feature:
- stm32g030
- stm32g050
- stm32g070
- stm32g0b0
- stm32g031
- stm32g041
- stm32g070
- stm32g051
- stm32g061
- stm32g071
- stm32g081
- stm32g0b1
- stm32g0c1

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
Expand Down
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,17 @@ default = ["i2c-blocking"]
device-selected = []
rt = ["stm32g0/rt"]
stm32g030 = ["stm32g0/stm32g030", "stm32g0x0", "device-selected"]
stm32g050 = ["stm32g0/stm32g050", "stm32g0x0", "device-selected"]
stm32g070 = ["stm32g0/stm32g070", "stm32g0x0", "device-selected"]
stm32g0b0 = ["stm32g0/stm32g0b0", "stm32g0x0", "device-selected"]
stm32g031 = ["stm32g0/stm32g031", "stm32g0x1", "device-selected"]
stm32g041 = ["stm32g0/stm32g041", "stm32g0x1", "device-selected"]
stm32g051 = ["stm32g0/stm32g051", "stm32g0x1", "device-selected"]
stm32g061 = ["stm32g0/stm32g061", "stm32g0x1" ,"device-selected"]
stm32g071 = ["stm32g0/stm32g071", "stm32g0x1", "device-selected"]
stm32g081 = ["stm32g0/stm32g081", "stm32g0x1", "device-selected"]
stm32g0b1 = ["stm32g0/stm32g0b1", "stm32g0x1", "device-selected"]
stm32g0c1 = ["stm32g0/stm32g0c1", "stm32g0x1", "device-selected"]

stm32g0x0 = []
stm32g0x1 = []
Expand Down
24 changes: 21 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#[cfg(not(feature = "device-selected"))]
compile_error!(
"This crate requires one of the following features enabled: stm32g030, stm32g070, stm32g031, stm32g041, stm32g071, stm32g081"
"This crate requires one of the following features enabled: stm32g030, stm32g050, stm32g070, stm32g0b0, stm32g031, stm32g041, stm32g051, stm32g061, stm32g071, stm32g081, stm32g0b1, stm32g0c1"
);

extern crate bare_metal;
Expand All @@ -22,20 +22,38 @@ pub use stm32 as pac;
#[cfg(feature = "stm32g030")]
pub use stm32g0::stm32g030 as stm32;

#[cfg(feature = "stm32g050")]
pub use stm32g0::stm32g050 as stm32;

#[cfg(feature = "stm32g070")]
pub use stm32g0::stm32g070 as stm32;

#[cfg(feature = "stm32g0b0")]
pub use stm32g0::stm32g0b0 as stm32;

#[cfg(feature = "stm32g031")]
pub use stm32g0::stm32g031 as stm32;

#[cfg(feature = "stm32g041")]
pub use stm32g0::stm32g041 as stm32;

#[cfg(feature = "stm32g051")]
pub use stm32g0::stm32g051 as stm32;

#[cfg(feature = "stm32g061")]
pub use stm32g0::stm32g061 as stm32;

#[cfg(feature = "stm32g071")]
pub use stm32g0::stm32g071 as stm32;

#[cfg(feature = "stm32g081")]
pub use stm32g0::stm32g081 as stm32;

#[cfg(feature = "stm32g070")]
pub use stm32g0::stm32g070 as stm32;
#[cfg(feature = "stm32g0b1")]
pub use stm32g0::stm32g0b1 as stm32;

#[cfg(feature = "stm32g0c1")]
pub use stm32g0::stm32g0c1 as stm32;

#[cfg(feature = "rt")]
pub use crate::stm32::interrupt;
Expand Down

0 comments on commit d168689

Please sign in to comment.