Skip to content

Commit d495b51

Browse files
committed
update stm32g0 dependency and add new chip variant features
1 parent afce1be commit d495b51

File tree

3 files changed

+34
-4
lines changed

3 files changed

+34
-4
lines changed

.github/workflows/ci.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,17 @@ jobs:
1212
- stable
1313
feature:
1414
- stm32g030
15+
- stm32g050
16+
- stm32g070
17+
- stm32g0b0
1518
- stm32g031
1619
- stm32g041
17-
- stm32g070
20+
- stm32g051
21+
- stm32g061
1822
- stm32g071
1923
- stm32g081
24+
- stm32g0b1
25+
- stm32g0c1
2026
steps:
2127
- uses: actions/checkout@v2
2228
- uses: actions-rs/toolchain@v1

Cargo.toml

+6
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,17 @@ default = ["i2c-blocking"]
5353
device-selected = []
5454
rt = ["stm32g0/rt"]
5555
stm32g030 = ["stm32g0/stm32g030", "stm32g0x0", "device-selected"]
56+
stm32g050 = ["stm32g0/stm32g050", "stm32g0x0", "device-selected"]
5657
stm32g070 = ["stm32g0/stm32g070", "stm32g0x0", "device-selected"]
58+
stm32g0b0 = ["stm32g0/stm32g0b0", "stm32g0x0", "device-selected"]
5759
stm32g031 = ["stm32g0/stm32g031", "stm32g0x1", "device-selected"]
5860
stm32g041 = ["stm32g0/stm32g041", "stm32g0x1", "device-selected"]
61+
stm32g051 = ["stm32g0/stm32g051", "stm32g0x1", "device-selected"]
62+
stm32g061 = ["stm32g0/stm32g061", "stm32g0x1", "device-selected"]
5963
stm32g071 = ["stm32g0/stm32g071", "stm32g0x1", "device-selected"]
6064
stm32g081 = ["stm32g0/stm32g081", "stm32g0x1", "device-selected"]
65+
stm32g0b1 = ["stm32g0/stm32g0b1", "stm32g0x1", "device-selected"]
66+
stm32g0c1 = ["stm32g0/stm32g0c1", "stm32g0x1", "device-selected"]
6167

6268
stm32g0x0 = []
6369
stm32g0x1 = []

src/lib.rs

+21-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

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

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

25+
#[cfg(feature = "stm32g050")]
26+
pub use stm32g0::stm32g050 as stm32;
27+
28+
#[cfg(feature = "stm32g070")]
29+
pub use stm32g0::stm32g070 as stm32;
30+
31+
#[cfg(feature = "stm32g0b0")]
32+
pub use stm32g0::stm32g0b0 as stm32;
33+
2534
#[cfg(feature = "stm32g031")]
2635
pub use stm32g0::stm32g031 as stm32;
2736

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

40+
#[cfg(feature = "stm32g051")]
41+
pub use stm32g0::stm32g051 as stm32;
42+
43+
#[cfg(feature = "stm32g061")]
44+
pub use stm32g0::stm32g061 as stm32;
45+
3146
#[cfg(feature = "stm32g071")]
3247
pub use stm32g0::stm32g071 as stm32;
3348

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

37-
#[cfg(feature = "stm32g070")]
38-
pub use stm32g0::stm32g070 as stm32;
52+
#[cfg(feature = "stm32g0b1")]
53+
pub use stm32g0::stm32g0b1 as stm32;
54+
55+
#[cfg(feature = "stm32g0c1")]
56+
pub use stm32g0::stm32g0c1 as stm32;
3957

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

0 commit comments

Comments
 (0)