Skip to content

Commit 2c5c1f5

Browse files
author
Henrik Snöman
committed
Added h523/h533 support
1 parent 4afdbe9 commit 2c5c1f5

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

Cargo.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ rm0481 = [] # STM32H52x/6x/7x
2929

3030
# Different subfamily groups have different selections of identical peripherals
3131
h56x_h573 = ["gpio-h56x_h573"] # STM32H56x/STM32H573
32-
h523_h533 = [] # STM32H523/STM32H533
32+
h523_h533 = ["gpio-h56x_h573"] # STM32H523/STM32H533
3333

3434
# Different subfamily groups have different GPIOs available and different alternate functions
3535
# available
@@ -44,6 +44,7 @@ sdmmc2 = [] # Only STM32H563/73 have SDMMC2
4444
rt = ["stm32h5/rt"]
4545
stm32h503 = ["stm32h5/stm32h503", "device-selected", "rm0492"]
4646
stm32h523 = ["stm32h5/stm32h523", "device-selected", "rm0481", "h523_h533"]
47+
stm32h533 = ["stm32h5/stm32h533", "device-selected", "rm0481", "h523_h533"]
4748
stm32h562 = ["stm32h5/stm32h562", "device-selected", "rm0481", "h56x_h573"]
4849
stm32h563 = ["stm32h5/stm32h563", "device-selected", "rm0481", "h56x_h573", "sdmmc2", "ethernet"]
4950
stm32h573 = ["stm32h5/stm32h573", "device-selected", "rm0481", "h56x_h573", "otfdec", "sdmmc2", "ethernet"]
@@ -56,8 +57,8 @@ log-semihost = ["log"]
5657

5758
[dependencies]
5859
cortex-m = { version = "^0.7.7", features = ["critical-section-single-core"] }
59-
stm32h5 = { git = "https://github.com/stm32-rs/stm32-rs-nightlies" }
60-
#stm32h5 = { package = "stm32h5-staging", version = "0.17.0" }
60+
#stm32h5 = { package = "stm32h5-staging", version = "0.18.0" }
61+
stm32h5 = { git="https://github.com/stm32-rs/stm32-rs-nightlies" }
6162
fugit = "0.3.7"
6263
embedded-hal = "1.0.0"
6364
defmt = { version = "0.3.8", optional = true }

src/gpio/gpio_def.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,10 @@ mod h503 {
146146
}
147147

148148
#[cfg(feature = "gpio-h56x_h573")]
149-
pub use h56x_h573::*;
149+
pub use h523_h533_h56x_h573::*;
150150

151151
#[cfg(feature = "gpio-h56x_h573")]
152-
mod h56x_h573 {
152+
mod h523_h533_h56x_h573 {
153153
use super::Gpio;
154154

155155
gpio!(GPIOA, gpioa, Gpioa, PA, 'A', PAn, [
@@ -330,6 +330,7 @@ mod h56x_h573 {
330330
'F' => crate::pac::GPIOF::ptr() as _,
331331
'G' => crate::pac::GPIOG::ptr() as _,
332332
'H' => crate::pac::GPIOH::ptr() as _,
333+
#[cfg(feature = "h56x_h573")]
333334
'I' => crate::pac::GPIOI::ptr() as _,
334335
_ => panic!("Unknown GPIO port"),
335336
}

src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ compile_error!(
77
"This crate requires one of the following device features enabled:
88
stm32h503
99
stm32h523
10+
stm32h533
1011
stm32h562
1112
stm32h563
1213
stm32h573
@@ -22,6 +23,9 @@ pub use stm32h5::stm32h503 as stm32;
2223
#[cfg(feature = "stm32h523")]
2324
pub use stm32h5::stm32h523 as stm32;
2425

26+
#[cfg(feature = "stm32h533")]
27+
pub use stm32h5::stm32h533 as stm32;
28+
2529
#[cfg(feature = "stm32h562")]
2630
pub use stm32h5::stm32h562 as stm32;
2731

0 commit comments

Comments
 (0)