File tree 5 files changed +447
-0
lines changed
5 files changed +447
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
12
12
- Support for 16-bit words with SPI ([ #107 ] ( https://github.com/stm32-rs/stm32f3xx-hal/pull/107 ) )
13
13
- SPI support for reclock after initialization ([ #98 ] ( https://github.com/stm32-rs/stm32f3xx-hal/pull/98 ) )
14
14
- Support for ` stm32f302x6 ` and ` stm32f302x8 ` devices ([ #132 ] ( https://github.com/stm32-rs/stm32f3xx-hal/pull/132 ) )
15
+ - Support for the onboard real-time clock (RTC) ([ #136 ] ( https://github.com/stm32-rs/stm32f3xx-hal/pull/136 ) )
15
16
16
17
## [ v0.5.0] - 2020-07-21
17
18
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ embedded-dma = "0.1"
22
22
embedded-hal = " 0.2"
23
23
nb = " 0.1"
24
24
stm32f3 = " 0.11"
25
+ rtcc = " 0.2"
25
26
26
27
[dependencies .bare-metal ]
27
28
version = " 0.2"
Original file line number Diff line number Diff line change @@ -131,6 +131,8 @@ pub mod pwm;
131
131
#[ cfg( feature = "device-selected" ) ]
132
132
pub mod rcc;
133
133
#[ cfg( feature = "device-selected" ) ]
134
+ pub mod rtc;
135
+ #[ cfg( feature = "device-selected" ) ]
134
136
pub mod serial;
135
137
#[ cfg( feature = "device-selected" ) ]
136
138
pub mod spi;
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ impl RccExt for RCC {
20
20
ahb : AHB { _0 : ( ) } ,
21
21
apb1 : APB1 { _0 : ( ) } ,
22
22
apb2 : APB2 { _0 : ( ) } ,
23
+ bdcr : BDCR { _0 : ( ) } ,
23
24
cfgr : CFGR {
24
25
hse : None ,
25
26
hclk : None ,
@@ -48,6 +49,8 @@ pub struct Rcc {
48
49
pub apb1 : APB1 ,
49
50
/// Advanced Peripheral Bus 2 (APB2) registers
50
51
pub apb2 : APB2 ,
52
+ /// RCC Backup Domain
53
+ pub bdcr : BDCR ,
51
54
/// Clock configuration
52
55
pub cfgr : CFGR ,
53
56
}
@@ -190,6 +193,18 @@ mod usb_clocking {
190
193
}
191
194
}
192
195
196
+ /// Backup Domain Control register (RCC_BDCR)
197
+ pub struct BDCR {
198
+ _0 : ( ) ,
199
+ }
200
+
201
+ impl BDCR {
202
+ pub ( crate ) fn bdcr ( & mut self ) -> & rcc:: BDCR {
203
+ // NOTE(unsafe) this proxy grants exclusive access to this register
204
+ unsafe { & ( * RCC :: ptr ( ) ) . bdcr }
205
+ }
206
+ }
207
+
193
208
/// Clock configuration
194
209
///
195
210
/// An instance of this struct is aquired from the [Rcc](../struct.Rcc.html) struct.
You can’t perform that action at this time.
0 commit comments