File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 94
94
95
95
#![ no_std]
96
96
97
- // Some pac crates have fields specified in such a way that they are safe and other
98
- // have them unsafe (likely an SVD error that needs patching). Unsafe blocks for
99
- // one device cause warnings for the safe devices. This disables that warning.
100
- #![ allow( unused_unsafe) ]
101
-
102
97
// If no target specified, print error message.
103
98
#[ cfg( not( any( feature = "stm32f100" , feature = "stm32f101" , feature = "stm32f103" ) ) ) ]
104
99
compile_error ! ( "Target not found. A `--feature <target-name>` is required." ) ;
Original file line number Diff line number Diff line change @@ -103,6 +103,9 @@ impl Rtc {
103
103
// Set alarm time
104
104
// See section 18.3.5 for explanation
105
105
let alarm_value = counter_value - 1 ;
106
+
107
+ // TODO: Remove this `allow` once these fields are made safe for stm32f100
108
+ #[ allow( unused_unsafe) ]
106
109
self . perform_write ( |s| {
107
110
s. regs . alrh . write ( |w| unsafe { w. alrh ( ) . bits ( ( alarm_value >> 16 ) as u16 ) } ) ;
108
111
s. regs . alrl . write ( |w| unsafe { w. alrl ( ) . bits ( alarm_value as u16 ) } ) ;
Original file line number Diff line number Diff line change @@ -289,6 +289,9 @@ macro_rules! hal {
289
289
290
290
let ( psc, arr) = compute_arr_presc( timeout. into( ) . 0 , self . clk. 0 ) ;
291
291
self . tim. psc. write( |w| w. psc( ) . bits( psc) ) ;
292
+
293
+ // TODO: Remove this `allow` once this field is made safe for stm32f100
294
+ #[ allow( unused_unsafe) ]
292
295
self . tim. arr. write( |w| unsafe { w. arr( ) . bits( arr) } ) ;
293
296
294
297
// Trigger an update event to load the prescaler value to the clock
You can’t perform that action at this time.
0 commit comments