Skip to content

Commit 33fcaeb

Browse files
committed
update stm32g0 dependency and add new chip variant features
1 parent be92697 commit 33fcaeb

File tree

3 files changed

+45
-9
lines changed

3 files changed

+45
-9
lines changed

.github/workflows/ci.yml

+8-2
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

2127
steps:
2228
- uses: actions/checkout@v2
@@ -28,4 +34,4 @@ jobs:
2834
override: true
2935

3036
- name: Regular build
31-
run: cargo check --features ${{ matrix.feature }}
37+
run: cargo check --features ${{ matrix.feature }}

Cargo.toml

+7-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ cortex-m = "0.7.1"
2020
nb = "1.0.0"
2121

2222
[dependencies.stm32g0]
23-
version = "0.13.0"
23+
version = "0.14.0"
2424
features = ["rt"]
2525

2626
[dependencies.bare-metal]
@@ -50,11 +50,17 @@ ws2812-spi = { version = "0.3.0", features = [] }
5050
[features]
5151
rt = ["stm32g0/rt"]
5252
stm32g030 = ["stm32g0/stm32g030", "stm32g0x0"]
53+
stm32g050 = ["stm32g0/stm32g050", "stm32g0x0"]
5354
stm32g070 = ["stm32g0/stm32g070", "stm32g0x0"]
55+
stm32g0b0 = ["stm32g0/stm32g0b0", "stm32g0x0"]
5456
stm32g031 = ["stm32g0/stm32g031", "stm32g0x1"]
5557
stm32g041 = ["stm32g0/stm32g041", "stm32g0x1"]
58+
stm32g051 = ["stm32g0/stm32g051", "stm32g0x1"]
59+
stm32g061 = ["stm32g0/stm32g061", "stm32g0x1"]
5660
stm32g071 = ["stm32g0/stm32g071", "stm32g0x1"]
5761
stm32g081 = ["stm32g0/stm32g081", "stm32g0x1"]
62+
stm32g0b1 = ["stm32g0/stm32g0b1", "stm32g0x1"]
63+
stm32g0c1 = ["stm32g0/stm32g0c1", "stm32g0x1"]
5864

5965
stm32g0x0 = []
6066
stm32g0x1 = []

src/lib.rs

+30-6
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,21 @@
22
#![allow(non_camel_case_types)]
33

44
#[cfg(not(any(
5-
feature = "stm32g070",
6-
feature = "stm32g071",
75
feature = "stm32g030",
6+
feature = "stm32g050",
7+
feature = "stm32g070",
8+
feature = "stm32g0b0",
89
feature = "stm32g031",
910
feature = "stm32g041",
10-
feature = "stm32g081"
11+
feature = "stm32g051",
12+
feature = "stm32g061",
13+
feature = "stm32g071",
14+
feature = "stm32g081",
15+
feature = "stm32g0b1",
16+
feature = "stm32g0c1",
1117
)))]
1218
compile_error!(
13-
"This crate requires one of the following features enabled: stm32g030, stm32g070, stm32g031, stm32g041, stm32g071, stm32g081"
19+
"This crate requires one of the following features enabled: stm32g030, stm32g050, stm32g070, stm32g0b0, stm32g031, stm32g041, stm32g051, stm32g061, stm32g071, stm32g081, stm32g0b1, stm32g0c1"
1420
);
1521

1622
extern crate bare_metal;
@@ -26,20 +32,38 @@ pub use nb::block;
2632
#[cfg(feature = "stm32g030")]
2733
pub use stm32g0::stm32g030 as stm32;
2834

35+
#[cfg(feature = "stm32g050")]
36+
pub use stm32g0::stm32g050 as stm32;
37+
38+
#[cfg(feature = "stm32g070")]
39+
pub use stm32g0::stm32g070 as stm32;
40+
41+
#[cfg(feature = "stm32g0b0")]
42+
pub use stm32g0::stm32g0b0 as stm32;
43+
2944
#[cfg(feature = "stm32g031")]
3045
pub use stm32g0::stm32g031 as stm32;
3146

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

50+
#[cfg(feature = "stm32g051")]
51+
pub use stm32g0::stm32g051 as stm32;
52+
53+
#[cfg(feature = "stm32g061")]
54+
pub use stm32g0::stm32g061 as stm32;
55+
3556
#[cfg(feature = "stm32g071")]
3657
pub use stm32g0::stm32g071 as stm32;
3758

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

41-
#[cfg(feature = "stm32g070")]
42-
pub use stm32g0::stm32g070 as stm32;
62+
#[cfg(feature = "stm32g0b1")]
63+
pub use stm32g0::stm32g0b1 as stm32;
64+
65+
#[cfg(feature = "stm32g0c1")]
66+
pub use stm32g0::stm32g0c1 as stm32;
4367

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

0 commit comments

Comments
 (0)