Skip to content

Commit cb53d62

Browse files
committed
pbio/drv/clock/clock_ev3: Remove unnecessary use of reload
Because the time period never changes, there is no reason to use reload
1 parent a339104 commit cb53d62

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/pbio/drv/clock/clock_ev3.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ void systick_suspend(void) {
6565
*/
6666
void systick_resume(void) {
6767
/* Enable the timer interrupt */
68-
TimerEnable(SOC_TMR_0_REGS, TMR_TIMER34, TMR_ENABLE_CONTRELOAD);
68+
TimerEnable(SOC_TMR_0_REGS, TMR_TIMER34, TMR_ENABLE_CONT);
6969
}
7070

7171
/**
@@ -81,7 +81,6 @@ void pbdrv_clock_init(void) {
8181
/* Set up the timer */
8282
TimerConfigure(SOC_TMR_0_REGS, TMR_CFG_32BIT_UNCH_CLK_BOTH_INT);
8383
TimerPeriodSet(SOC_TMR_0_REGS, TMR_TIMER34, TMR_PERIOD_LSB32);
84-
TimerReloadSet(SOC_TMR_0_REGS, TMR_TIMER34, TMR_PERIOD_LSB32);
8584

8685
/* Register the Timer ISR */
8786
IntRegister(SYS_INT_TINT34_0, systick_isr_C);
@@ -96,7 +95,7 @@ void pbdrv_clock_init(void) {
9695
TimerIntEnable(SOC_TMR_0_REGS, TMR_INT_TMR34_NON_CAPT_MODE);
9796

9897
/* Start the timer */
99-
TimerEnable(SOC_TMR_0_REGS, TMR_TIMER34, TMR_ENABLE_CONTRELOAD);
98+
TimerEnable(SOC_TMR_0_REGS, TMR_TIMER34, TMR_ENABLE_CONT);
10099
}
101100

102101
uint32_t pbdrv_clock_get_us(void) {

0 commit comments

Comments
 (0)