File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -466,6 +466,22 @@ impl Rtc {
466
466
467
467
result
468
468
}
469
+
470
+ /// Read content of the backup register.
471
+ ///
472
+ /// The registers retain their values during wakes from standby mode or system resets. They also
473
+ /// retain their value when Vdd is switched off as long as V_BAT is powered.
474
+ pub fn read_backup_register ( & self , register : usize ) -> u32 {
475
+ self . rtc . bkpr [ register] . read ( ) . bits ( )
476
+ }
477
+
478
+ /// Set content of the backup register.
479
+ ///
480
+ /// The registers retain their values during wakes from standby mode or system resets. They also
481
+ /// retain their value when Vdd is switched off as long as V_BAT is powered.
482
+ pub fn write_backup_register ( & self , register : usize , value : u32 ) {
483
+ unsafe { self . rtc . bkpr [ register] . write ( |w| w. bits ( value) ) }
484
+ }
469
485
}
470
486
471
487
/// The RTC wakeup timer
You can’t perform that action at this time.
0 commit comments