Skip to content
This repository was archived by the owner on Aug 9, 2022. It is now read-only.

Commit bedcab2

Browse files
committed
rename autoreload
1 parent 30e88be commit bedcab2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/timer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ fn main() -> ! {
8484

8585
timer0.set_alarm(70_000_000.into());
8686
timer0.enable_alarm(true);
87-
timer0.autoreload(true);
87+
timer0.auto_reload(true);
8888
timer0.enable_level_interrupt(true);
8989
timer0.enable_edge_interrupt(true);
9090

src/timer/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ static TIMER_MUTEX: spin::Mutex<()> = spin::Mutex::new(());
100100
macro_rules! timer {
101101
($TIMX:ident, $INT_ENA:ident, $CONFIG:ident, $HI:ident, $LO: ident,
102102
$LOAD: ident, $LOAD_HI: ident, $LOAD_LO:ident, $UPDATE:ident, $ALARM_HI:ident,
103-
$ALARM_LO:ident, $EN:ident, $INCREASE:ident, $AUTORE_LOAD:ident, $DIVIDER:ident,
103+
$ALARM_LO:ident, $EN:ident, $INCREASE:ident, $AUTO_RELOAD:ident, $DIVIDER:ident,
104104
$EDGE_INT_EN:ident, $LEVEL_INT_EN:ident, $ALARM_EN:ident,
105105
$INT_RAW:ident, $INT_ST:ident, $INT_CLR:ident
106106
) => {
@@ -190,11 +190,11 @@ macro_rules! timer {
190190
}
191191
}
192192

193-
pub fn autoreload(&mut self, enable: bool) {
193+
pub fn auto_reload(&mut self, enable: bool) {
194194
unsafe {
195195
(*(self.timg))
196196
.$CONFIG
197-
.modify(|_, w| w.$AUTORE_LOAD().bit(enable))
197+
.modify(|_, w| w.$AUTO_RELOAD().bit(enable))
198198
}
199199
}
200200

0 commit comments

Comments
 (0)