Skip to content

Commit e28e46b

Browse files
committed
v0.6.0
1 parent 33c2f95 commit e28e46b

File tree

1,367 files changed

+657704
-29130
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,367 files changed

+657704
-29130
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## [Unreleased]
44

5+
## [v0.6.0] - 2021-10-03
6+
7+
* Update stm32-rs to 0.14.0
8+
59
## [v0.5.0] - 2021-01-08
610

711
* Update stm32-rs to 0.12.1
@@ -33,7 +37,9 @@
3337

3438
* Initial release
3539

36-
[Unreleased]: https://github.com/adamgreig/stm32ral/compare/v0.4.1...HEAD
40+
[Unreleased]: https://github.com/adamgreig/stm32ral/compare/v0.6.0...HEAD
41+
[v0.6.0]: https://github.com/adamgreig/stm32ral/compare/v0.5.0...v0.6.0
42+
[v0.5.0]: https://github.com/adamgreig/stm32ral/compare/v0.4.1...v0.5.0
3743
[v0.4.1]: https://github.com/adamgreig/stm32ral/compare/v0.4.0...v0.4.1
3844
[v0.4.0]: https://github.com/adamgreig/stm32ral/compare/v0.3.1...v0.4.0
3945
[v0.3.0]: https://github.com/adamgreig/stm32ral/compare/v0.3.0...v0.3.1

Cargo.toml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ edition = "2018"
1414
exclude = ["/stm32-rs"]
1515

1616
# Change version in stm32ral.py, not in Cargo.toml!
17-
version = "0.5.0"
17+
version = "0.6.0"
1818

1919
[package.metadata.docs.rs]
2020
features = ["doc"]
@@ -79,37 +79,52 @@ stm32f7x9 = ["armv7em"]
7979
stm32g030 = ["armv6m"]
8080
stm32g031 = ["armv6m"]
8181
stm32g041 = ["armv6m"]
82+
stm32g050 = ["armv6m"]
83+
stm32g051 = ["armv6m"]
84+
stm32g061 = ["armv6m"]
8285
stm32g070 = ["armv6m"]
8386
stm32g071 = ["armv6m"]
8487
stm32g07x = ["armv6m"]
8588
stm32g081 = ["armv6m"]
89+
stm32g0b0 = ["armv6m"]
90+
stm32g0b1 = ["armv6m"]
91+
stm32g0c1 = ["armv6m"]
8692
stm32g431 = ["armv7em"]
8793
stm32g441 = ["armv7em"]
8894
stm32g471 = ["armv7em"]
8995
stm32g473 = ["armv7em"]
9096
stm32g474 = ["armv7em"]
9197
stm32g483 = ["armv7em"]
9298
stm32g484 = ["armv7em"]
99+
stm32g491 = ["armv7em"]
100+
stm32g4a1 = ["armv7em"]
101+
stm32h735 = ["armv7em"]
93102
stm32h743 = ["armv7em"]
94103
stm32h743v = ["armv7em"]
95104
stm32h747cm4 = ["armv7em"]
96105
stm32h747cm7 = ["armv7em"]
97106
stm32h753 = ["armv7em"]
98107
stm32h753v = ["armv7em"]
99108
stm32h7b3 = ["armv7em"]
109+
stm32l0x0 = ["armv6m"]
100110
stm32l0x1 = ["armv6m"]
101111
stm32l0x2 = ["armv6m"]
102112
stm32l0x3 = ["armv6m"]
103113
stm32l100 = ["armv7m"]
104114
stm32l151 = ["armv7m"]
105115
stm32l162 = ["armv7m"]
116+
stm32l412 = ["armv7em"]
117+
stm32l4r9 = ["armv7em"]
106118
stm32l4x1 = ["armv7em"]
107119
stm32l4x2 = ["armv7em"]
108120
stm32l4x3 = ["armv7em"]
109121
stm32l4x5 = ["armv7em"]
110122
stm32l4x6 = ["armv7em"]
111123
stm32l552 = ["armv8m"]
112124
stm32l562 = ["armv8m"]
125+
stm32mp153 = ["armv7em"]
113126
stm32mp157 = ["armv7em"]
114127
stm32wb55 = ["armv7em"]
128+
stm32wl5x_cm0p = ["armv6m"]
129+
stm32wl5x_cm4 = ["armv7em"]
115130
stm32wle5 = ["armv7em"]

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -566,9 +566,6 @@ First set up the stm32-rs submodule:
566566

567567
```
568568
$ git submodule update --init
569-
$ cd stm32-rs/svd
570-
$ ./extract.sh
571-
$ cd ../..
572569
```
573570

574571
Now you should simply be able to run make, which will automatically run

build.rs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ fn main() {
8585
"src/stm32g0/stm32g031/device.x"
8686
} else if env::var_os("CARGO_FEATURE_STM32G041").is_some() {
8787
"src/stm32g0/stm32g041/device.x"
88+
} else if env::var_os("CARGO_FEATURE_STM32G050").is_some() {
89+
"src/stm32g0/stm32g050/device.x"
90+
} else if env::var_os("CARGO_FEATURE_STM32G051").is_some() {
91+
"src/stm32g0/stm32g051/device.x"
92+
} else if env::var_os("CARGO_FEATURE_STM32G061").is_some() {
93+
"src/stm32g0/stm32g061/device.x"
8894
} else if env::var_os("CARGO_FEATURE_STM32G070").is_some() {
8995
"src/stm32g0/stm32g070/device.x"
9096
} else if env::var_os("CARGO_FEATURE_STM32G071").is_some() {
@@ -93,6 +99,12 @@ fn main() {
9399
"src/stm32g0/stm32g07x/device.x"
94100
} else if env::var_os("CARGO_FEATURE_STM32G081").is_some() {
95101
"src/stm32g0/stm32g081/device.x"
102+
} else if env::var_os("CARGO_FEATURE_STM32G0B0").is_some() {
103+
"src/stm32g0/stm32g0b0/device.x"
104+
} else if env::var_os("CARGO_FEATURE_STM32G0B1").is_some() {
105+
"src/stm32g0/stm32g0b1/device.x"
106+
} else if env::var_os("CARGO_FEATURE_STM32G0C1").is_some() {
107+
"src/stm32g0/stm32g0c1/device.x"
96108
} else if env::var_os("CARGO_FEATURE_STM32G431").is_some() {
97109
"src/stm32g4/stm32g431/device.x"
98110
} else if env::var_os("CARGO_FEATURE_STM32G441").is_some() {
@@ -107,6 +119,12 @@ fn main() {
107119
"src/stm32g4/stm32g483/device.x"
108120
} else if env::var_os("CARGO_FEATURE_STM32G484").is_some() {
109121
"src/stm32g4/stm32g484/device.x"
122+
} else if env::var_os("CARGO_FEATURE_STM32G491").is_some() {
123+
"src/stm32g4/stm32g491/device.x"
124+
} else if env::var_os("CARGO_FEATURE_STM32G4A1").is_some() {
125+
"src/stm32g4/stm32g4a1/device.x"
126+
} else if env::var_os("CARGO_FEATURE_STM32H735").is_some() {
127+
"src/stm32h7/stm32h735/device.x"
110128
} else if env::var_os("CARGO_FEATURE_STM32H743").is_some() {
111129
"src/stm32h7/stm32h743/device.x"
112130
} else if env::var_os("CARGO_FEATURE_STM32H743V").is_some() {
@@ -121,6 +139,8 @@ fn main() {
121139
"src/stm32h7/stm32h753v/device.x"
122140
} else if env::var_os("CARGO_FEATURE_STM32H7B3").is_some() {
123141
"src/stm32h7/stm32h7b3/device.x"
142+
} else if env::var_os("CARGO_FEATURE_STM32L0X0").is_some() {
143+
"src/stm32l0/stm32l0x0/device.x"
124144
} else if env::var_os("CARGO_FEATURE_STM32L0X1").is_some() {
125145
"src/stm32l0/stm32l0x1/device.x"
126146
} else if env::var_os("CARGO_FEATURE_STM32L0X2").is_some() {
@@ -133,6 +153,10 @@ fn main() {
133153
"src/stm32l1/stm32l151/device.x"
134154
} else if env::var_os("CARGO_FEATURE_STM32L162").is_some() {
135155
"src/stm32l1/stm32l162/device.x"
156+
} else if env::var_os("CARGO_FEATURE_STM32L412").is_some() {
157+
"src/stm32l4/stm32l412/device.x"
158+
} else if env::var_os("CARGO_FEATURE_STM32L4R9").is_some() {
159+
"src/stm32l4/stm32l4r9/device.x"
136160
} else if env::var_os("CARGO_FEATURE_STM32L4X1").is_some() {
137161
"src/stm32l4/stm32l4x1/device.x"
138162
} else if env::var_os("CARGO_FEATURE_STM32L4X2").is_some() {
@@ -147,10 +171,16 @@ fn main() {
147171
"src/stm32l5/stm32l552/device.x"
148172
} else if env::var_os("CARGO_FEATURE_STM32L562").is_some() {
149173
"src/stm32l5/stm32l562/device.x"
174+
} else if env::var_os("CARGO_FEATURE_STM32MP153").is_some() {
175+
"src/stm32mp/stm32mp153/device.x"
150176
} else if env::var_os("CARGO_FEATURE_STM32MP157").is_some() {
151177
"src/stm32mp/stm32mp157/device.x"
152178
} else if env::var_os("CARGO_FEATURE_STM32WB55").is_some() {
153179
"src/stm32wb/stm32wb55/device.x"
180+
} else if env::var_os("CARGO_FEATURE_STM32WL5X_CM0P").is_some() {
181+
"src/stm32wl/stm32wl5x_cm0p/device.x"
182+
} else if env::var_os("CARGO_FEATURE_STM32WL5X_CM4").is_some() {
183+
"src/stm32wl/stm32wl5x_cm4/device.x"
154184
} else if env::var_os("CARGO_FEATURE_STM32WLE5").is_some() {
155185
"src/stm32wl/stm32wle5/device.x"
156186
} else {

src/lib.rs

Lines changed: 52 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ pub use stm32f7::stm32f7x7::*;
174174
#[cfg(feature="stm32f7x9")]
175175
pub use stm32f7::stm32f7x9::*;
176176

177-
#[cfg(any(feature="doc", feature="stm32g030", feature="stm32g031", feature="stm32g041", feature="stm32g070", feature="stm32g071", feature="stm32g07x", feature="stm32g081"))]
177+
#[cfg(any(feature="doc", feature="stm32g030", feature="stm32g031", feature="stm32g041", feature="stm32g050", feature="stm32g051", feature="stm32g061", feature="stm32g070", feature="stm32g071", feature="stm32g07x", feature="stm32g081", feature="stm32g0b0", feature="stm32g0b1", feature="stm32g0c1"))]
178178
pub mod stm32g0;
179179

180180
#[cfg(feature="stm32g030")]
@@ -186,6 +186,15 @@ pub use stm32g0::stm32g031::*;
186186
#[cfg(feature="stm32g041")]
187187
pub use stm32g0::stm32g041::*;
188188

189+
#[cfg(feature="stm32g050")]
190+
pub use stm32g0::stm32g050::*;
191+
192+
#[cfg(feature="stm32g051")]
193+
pub use stm32g0::stm32g051::*;
194+
195+
#[cfg(feature="stm32g061")]
196+
pub use stm32g0::stm32g061::*;
197+
189198
#[cfg(feature="stm32g070")]
190199
pub use stm32g0::stm32g070::*;
191200

@@ -198,7 +207,16 @@ pub use stm32g0::stm32g07x::*;
198207
#[cfg(feature="stm32g081")]
199208
pub use stm32g0::stm32g081::*;
200209

201-
#[cfg(any(feature="doc", feature="stm32g431", feature="stm32g441", feature="stm32g471", feature="stm32g473", feature="stm32g474", feature="stm32g483", feature="stm32g484"))]
210+
#[cfg(feature="stm32g0b0")]
211+
pub use stm32g0::stm32g0b0::*;
212+
213+
#[cfg(feature="stm32g0b1")]
214+
pub use stm32g0::stm32g0b1::*;
215+
216+
#[cfg(feature="stm32g0c1")]
217+
pub use stm32g0::stm32g0c1::*;
218+
219+
#[cfg(any(feature="doc", feature="stm32g431", feature="stm32g441", feature="stm32g471", feature="stm32g473", feature="stm32g474", feature="stm32g483", feature="stm32g484", feature="stm32g491", feature="stm32g4a1"))]
202220
pub mod stm32g4;
203221

204222
#[cfg(feature="stm32g431")]
@@ -222,9 +240,18 @@ pub use stm32g4::stm32g483::*;
222240
#[cfg(feature="stm32g484")]
223241
pub use stm32g4::stm32g484::*;
224242

225-
#[cfg(any(feature="doc", feature="stm32h743", feature="stm32h743v", feature="stm32h747cm4", feature="stm32h747cm7", feature="stm32h753", feature="stm32h753v", feature="stm32h7b3"))]
243+
#[cfg(feature="stm32g491")]
244+
pub use stm32g4::stm32g491::*;
245+
246+
#[cfg(feature="stm32g4a1")]
247+
pub use stm32g4::stm32g4a1::*;
248+
249+
#[cfg(any(feature="doc", feature="stm32h735", feature="stm32h743", feature="stm32h743v", feature="stm32h747cm4", feature="stm32h747cm7", feature="stm32h753", feature="stm32h753v", feature="stm32h7b3"))]
226250
pub mod stm32h7;
227251

252+
#[cfg(feature="stm32h735")]
253+
pub use stm32h7::stm32h735::*;
254+
228255
#[cfg(feature="stm32h743")]
229256
pub use stm32h7::stm32h743::*;
230257

@@ -246,9 +273,12 @@ pub use stm32h7::stm32h753v::*;
246273
#[cfg(feature="stm32h7b3")]
247274
pub use stm32h7::stm32h7b3::*;
248275

249-
#[cfg(any(feature="doc", feature="stm32l0x1", feature="stm32l0x2", feature="stm32l0x3"))]
276+
#[cfg(any(feature="doc", feature="stm32l0x0", feature="stm32l0x1", feature="stm32l0x2", feature="stm32l0x3"))]
250277
pub mod stm32l0;
251278

279+
#[cfg(feature="stm32l0x0")]
280+
pub use stm32l0::stm32l0x0::*;
281+
252282
#[cfg(feature="stm32l0x1")]
253283
pub use stm32l0::stm32l0x1::*;
254284

@@ -270,9 +300,15 @@ pub use stm32l1::stm32l151::*;
270300
#[cfg(feature="stm32l162")]
271301
pub use stm32l1::stm32l162::*;
272302

273-
#[cfg(any(feature="doc", feature="stm32l4x1", feature="stm32l4x2", feature="stm32l4x3", feature="stm32l4x5", feature="stm32l4x6"))]
303+
#[cfg(any(feature="doc", feature="stm32l412", feature="stm32l4r9", feature="stm32l4x1", feature="stm32l4x2", feature="stm32l4x3", feature="stm32l4x5", feature="stm32l4x6"))]
274304
pub mod stm32l4;
275305

306+
#[cfg(feature="stm32l412")]
307+
pub use stm32l4::stm32l412::*;
308+
309+
#[cfg(feature="stm32l4r9")]
310+
pub use stm32l4::stm32l4r9::*;
311+
276312
#[cfg(feature="stm32l4x1")]
277313
pub use stm32l4::stm32l4x1::*;
278314

@@ -297,9 +333,12 @@ pub use stm32l5::stm32l552::*;
297333
#[cfg(feature="stm32l562")]
298334
pub use stm32l5::stm32l562::*;
299335

300-
#[cfg(any(feature="doc", feature="stm32mp157"))]
336+
#[cfg(any(feature="doc", feature="stm32mp153", feature="stm32mp157"))]
301337
pub mod stm32mp;
302338

339+
#[cfg(feature="stm32mp153")]
340+
pub use stm32mp::stm32mp153::*;
341+
303342
#[cfg(feature="stm32mp157")]
304343
pub use stm32mp::stm32mp157::*;
305344

@@ -309,9 +348,15 @@ pub mod stm32wb;
309348
#[cfg(feature="stm32wb55")]
310349
pub use stm32wb::stm32wb55::*;
311350

312-
#[cfg(any(feature="doc", feature="stm32wle5"))]
351+
#[cfg(any(feature="doc", feature="stm32wl5x_cm0p", feature="stm32wl5x_cm4", feature="stm32wle5"))]
313352
pub mod stm32wl;
314353

354+
#[cfg(feature="stm32wl5x_cm0p")]
355+
pub use stm32wl::stm32wl5x_cm0p::*;
356+
357+
#[cfg(feature="stm32wl5x_cm4")]
358+
pub use stm32wl::stm32wl5x_cm4::*;
359+
315360
#[cfg(feature="stm32wle5")]
316361
pub use stm32wl::stm32wle5::*;
317362

src/stm32f0/peripherals/adc.rs

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -522,8 +522,8 @@ pub mod CFGR1 {
522522
}
523523
}
524524

525-
/// Auto-delayed conversion mode
526-
pub mod AUTDLY {
525+
/// Wait conversion mode
526+
pub mod WAIT {
527527
/// Offset (14 bits)
528528
pub const offset: u32 = 14;
529529
/// Mask (1 bit: 1 << 14)
@@ -532,8 +532,15 @@ pub mod CFGR1 {
532532
pub mod R {}
533533
/// Write-only values (empty)
534534
pub mod W {}
535-
/// Read-write values (empty)
536-
pub mod RW {}
535+
/// Read-write values
536+
pub mod RW {
537+
538+
/// 0b0: Wait conversion mode off
539+
pub const Disabled: u32 = 0b0;
540+
541+
/// 0b1: Wait conversion mode on
542+
pub const Enabled: u32 = 0b1;
543+
}
537544
}
538545

539546
/// Single / continuous conversion mode
@@ -745,27 +752,6 @@ pub mod CFGR1 {
745752
pub const Enabled: u32 = 0b1;
746753
}
747754
}
748-
749-
/// Wait conversion mode
750-
pub mod WAIT {
751-
/// Offset (14 bits)
752-
pub const offset: u32 = 14;
753-
/// Mask (1 bit: 1 << 14)
754-
pub const mask: u32 = 1 << offset;
755-
/// Read-only values (empty)
756-
pub mod R {}
757-
/// Write-only values (empty)
758-
pub mod W {}
759-
/// Read-write values
760-
pub mod RW {
761-
762-
/// 0b0: Wait conversion mode off
763-
pub const Disabled: u32 = 0b0;
764-
765-
/// 0b1: Wait conversion mode on
766-
pub const Enabled: u32 = 0b1;
767-
}
768-
}
769755
}
770756

771757
/// configuration register 2

src/stm32f0/peripherals/can.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ pub mod TSR {
594594
}
595595
}
596596

597-
/// CAN_RF0R
597+
/// CAN_RF%sR
598598
pub mod RF0R {
599599

600600
/// RFOM0
@@ -675,7 +675,7 @@ pub mod RF0R {
675675
}
676676
}
677677

678-
/// CAN_RF0R
678+
/// CAN_RF%sR
679679
pub mod RF1R {
680680
pub use super::RF0R::FMP;
681681
pub use super::RF0R::FOVR;
@@ -5835,10 +5835,10 @@ pub struct RegisterBlock {
58355835
/// CAN_TSR
58365836
pub TSR: RWRegister<u32>,
58375837

5838-
/// CAN_RF0R
5838+
/// CAN_RF%sR
58395839
pub RF0R: RWRegister<u32>,
58405840

5841-
/// CAN_RF0R
5841+
/// CAN_RF%sR
58425842
pub RF1R: RWRegister<u32>,
58435843

58445844
/// CAN_IER

0 commit comments

Comments
 (0)