Skip to content

Commit 000f3c1

Browse files
ccli8adbridge
authored andcommitted
Synchronize us_ticker to lp_ticker
This is to make implementations of us_ticker/lp_ticker consistent.
1 parent 52c3904 commit 000f3c1

File tree

5 files changed

+0
-45
lines changed

5 files changed

+0
-45
lines changed

targets/TARGET_NUVOTON/TARGET_M2351/us_ticker.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -123,16 +123,7 @@ void us_ticker_init(void)
123123

124124
void us_ticker_free(void)
125125
{
126-
TIMER_T *timer_base = (TIMER_T *) NU_MODBASE(TIMER_MODINIT.modname);
127-
128-
/* Stop counting */
129-
TIMER_Stop(timer_base);
130-
131-
/* Wait for timer to stop counting and unset active flag */
132-
while((timer_base->CTL & TIMER_CTL_ACTSTS_Msk));
133-
134126
/* Disable interrupt */
135-
TIMER_DisableInt(timer_base);
136127
NVIC_DisableIRQ(TIMER_MODINIT.irq_n);
137128

138129
/* Disable IP clock

targets/TARGET_NUVOTON/TARGET_M451/us_ticker.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,16 +91,7 @@ void us_ticker_init(void)
9191

9292
void us_ticker_free(void)
9393
{
94-
TIMER_T *timer_base = (TIMER_T *) NU_MODBASE(TIMER_MODINIT.modname);
95-
96-
/* Stop counting */
97-
TIMER_Stop(timer_base);
98-
99-
/* Wait for timer to stop counting and unset active flag */
100-
while((timer_base->CTL & TIMER_CTL_ACTSTS_Msk));
101-
10294
/* Disable interrupt */
103-
TIMER_DisableInt(timer_base);
10495
NVIC_DisableIRQ(TIMER_MODINIT.irq_n);
10596

10697
/* Disable IP clock */

targets/TARGET_NUVOTON/TARGET_M480/us_ticker.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,16 +91,7 @@ void us_ticker_init(void)
9191

9292
void us_ticker_free(void)
9393
{
94-
TIMER_T *timer_base = (TIMER_T *) NU_MODBASE(TIMER_MODINIT.modname);
95-
96-
/* Stop counting */
97-
TIMER_Stop(timer_base);
98-
99-
/* Wait for timer to stop counting and unset active flag */
100-
while((timer_base->CTL & TIMER_CTL_ACTSTS_Msk));
101-
10294
/* Disable interrupt */
103-
TIMER_DisableInt(timer_base);
10495
NVIC_DisableIRQ(TIMER_MODINIT.irq_n);
10596

10697
/* Disable IP clock */

targets/TARGET_NUVOTON/TARGET_NANO100/us_ticker.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,16 +93,7 @@ void us_ticker_init(void)
9393

9494
void us_ticker_free(void)
9595
{
96-
TIMER_T *timer_base = (TIMER_T *) NU_MODBASE(TIMER_MODINIT.modname);
97-
98-
/* Stop counting */
99-
TIMER_Stop(timer_base);
100-
101-
/* Wait for timer to stop counting and unset active flag */
102-
while((timer_base->CTL & TIMER_CTL_TMR_ACT_Msk));
103-
10496
/* Disable interrupt */
105-
TIMER_DisableInt(timer_base);
10697
NVIC_DisableIRQ(TIMER_MODINIT.irq_n);
10798

10899
/* Disable IP clock */

targets/TARGET_NUVOTON/TARGET_NUC472/us_ticker.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,16 +90,7 @@ void us_ticker_init(void)
9090

9191
void us_ticker_free(void)
9292
{
93-
TIMER_T *timer_base = (TIMER_T *) NU_MODBASE(TIMER_MODINIT.modname);
94-
95-
/* Stop counting */
96-
TIMER_Stop(timer_base);
97-
98-
/* Wait for timer to stop counting and unset active flag */
99-
while((timer_base->CTL & TIMER_CTL_ACTSTS_Msk));
100-
10193
/* Disable interrupt */
102-
TIMER_DisableInt(timer_base);
10394
NVIC_DisableIRQ(TIMER_MODINIT.irq_n);
10495

10596
/* Disable IP clock */

0 commit comments

Comments
 (0)