Home
last modified time | relevance | path

Searched refs:timer (Results 1 – 15 of 15) sorted by relevance

/hal_nuvoton-latest/m2l31x/StdDriver/inc/
Dtimer_pwm.h77 #define TPWM_ENABLE_PWM_MODE(timer) ((timer)->CTL |= TIMER_CTL_FUNCSEL_Msk) argument
90 #define TPWM_DISABLE_PWM_MODE(timer) ((timer)->CTL &= ~TIMER_CTL_FUNCSEL_Msk) argument
102 #define TPWM_START_COUNTER(timer) ((timer)->PWMCTL |= TIMER_PWMCTL_CNTEN_Msk) argument
114 #define TPWM_STOP_COUNTER(timer) ((timer)->PWMPERIOD = 0x0UL) argument
129 #define TPWM_SET_PRESCALER(timer, u32Prescaler) ((timer)->PWMCLKPSC = (u32Prescaler)) argument
141 #define TPWM_GET_PRESCALER(timer) ((timer)->PWMCLKPSC) argument
155 #define TPWM_SET_PERIOD(timer, u32Period) ((timer)->PWMPERIOD = (u32Period)) argument
167 #define TPWM_GET_PERIOD(timer) ((timer)->PWMPERIOD) argument
181 #define TPWM_SET_CMPDAT(timer, u32Cmp) ((timer)->PWMCMPDAT = (u32Cmp)) argument
193 #define TPWM_GET_CMPDAT(timer) ((timer)->PWMCMPDAT) argument
[all …]
Dtimer.h110 #define TIMER_SET_CMP_VALUE(timer, u32Value) ((timer)->CMP = (u32Value)) argument
124 #define TIMER_SET_PRESCALE_VALUE(timer, u32Value) ((timer)->CTL = ((timer)->CTL & ~TIMER_CTL_PSC_… argument
137 #define TIMER_IS_ACTIVE(timer) (((timer)->CTL & TIMER_CTL_ACTSTS_Msk) ? 1 : 0) argument
152 #define TIMER_SELECT_TOUT_PIN(timer, u32ToutSel) ((timer)->CTL = ((timer)->CTL & ~TIMER_CTL_TGLP… argument
167 #define TIMER_SET_OPMODE(timer, u32OpMode) ((timer)->CTL = ((timer)->CTL & ~TIMER_CTL_OPMODE_Msk)… argument
170 __STATIC_INLINE void TIMER_Start(TIMER_T *timer);
171 __STATIC_INLINE void TIMER_Stop(TIMER_T *timer);
172 __STATIC_INLINE void TIMER_EnableWakeup(TIMER_T *timer);
173 __STATIC_INLINE void TIMER_DisableWakeup(TIMER_T *timer);
174 __STATIC_INLINE void TIMER_StartCapture(TIMER_T *timer);
[all …]
/hal_nuvoton-latest/m46x/StdDriver/inc/
Dtimer_pwm.h177 #define TPWM_ENABLE_PWM_MODE(timer) ((timer)->ALTCTL = (1 << TIMER_ALTCTL_FUNCSEL_Pos)) argument
190 #define TPWM_DISABLE_PWM_MODE(timer) ((timer)->ALTCTL = (0 << TIMER_ALTCTL_FUNCSEL_Pos)) argument
202 #define TPWM_ENABLE_INDEPENDENT_MODE(timer) ((timer)->PWMCTL &= ~(1 << TIMER_PWMCTL_OUTMODE_Pos… argument
214 #define TPWM_ENABLE_COMPLEMENTARY_MODE(timer) ((timer)->PWMCTL |= (1 << TIMER_PWMCTL_OUTMODE_Pos)) argument
230 #define TPWM_SET_COUNTER_TYPE(timer, type) ((timer)->PWMCTL = ((timer)->PWMCTL & ~TIMER_PWMCTL… argument
242 #define TPWM_START_COUNTER(timer) ((timer)->PWMCTL |= TIMER_PWMCTL_CNTEN_Msk) argument
254 #define TPWM_STOP_COUNTER(timer) ((timer)->PWMPERIOD = 0x0) argument
269 #define TPWM_SET_PRESCALER(timer, prescaler) ((timer)->PWMCLKPSC = (prescaler)) argument
281 #define TPWM_GET_PRESCALER(timer) ((timer)->PWMCLKPSC) argument
295 #define TPWM_SET_PERIOD(timer, period) ((timer)->PWMPERIOD = (period)) argument
[all …]
Dtimer.h112 #define TIMER_SET_CMP_VALUE(timer, u32Value) ((timer)->CMP = (u32Value)) argument
126 #define TIMER_SET_PRESCALE_VALUE(timer, u32Value) ((timer)->CTL = ((timer)->CTL & ~TIMER_CTL_PSC_… argument
139 #define TIMER_IS_ACTIVE(timer) (((timer)->CTL & TIMER_CTL_ACTSTS_Msk)? 1 : 0) argument
154 #define TIMER_SELECT_TOUT_PIN(timer, u32ToutSel) ((timer)->CTL = ((timer)->CTL & ~TIMER_CTL_TGLP… argument
169 #define TIMER_SET_OPMODE(timer, u32OpMode) ((timer)->CTL = ((timer)->CTL & ~TIMER_CTL_OPMODE_Msk)… argument
172 __STATIC_INLINE void TIMER_Start(TIMER_T *timer);
173 __STATIC_INLINE void TIMER_Stop(TIMER_T *timer);
174 __STATIC_INLINE void TIMER_EnableWakeup(TIMER_T *timer);
175 __STATIC_INLINE void TIMER_DisableWakeup(TIMER_T *timer);
176 __STATIC_INLINE void TIMER_StartCapture(TIMER_T *timer);
[all …]
/hal_nuvoton-latest/m48x/StdDriver/inc/
Dtimer_pwm.h151 #define TPWM_ENABLE_PWM_MODE(timer) ((timer)->ALTCTL = (1 << TIMER_ALTCTL_FUNCSEL_Pos)) argument
164 #define TPWM_DISABLE_PWM_MODE(timer) ((timer)->ALTCTL = (0 << TIMER_ALTCTL_FUNCSEL_Pos)) argument
176 #define TPWM_ENABLE_INDEPENDENT_MODE(timer) ((timer)->PWMCTL &= ~(1 << TIMER_PWMCTL_OUTMODE_Pos… argument
188 #define TPWM_ENABLE_COMPLEMENTARY_MODE(timer) ((timer)->PWMCTL |= (1 << TIMER_PWMCTL_OUTMODE_Pos)) argument
204 #define TPWM_SET_COUNTER_TYPE(timer, type) ((timer)->PWMCTL = ((timer)->PWMCTL & ~TIMER_PWMCTL… argument
216 #define TPWM_START_COUNTER(timer) ((timer)->PWMCTL |= TIMER_PWMCTL_CNTEN_Msk) argument
228 #define TPWM_STOP_COUNTER(timer) ((timer)->PWMPERIOD = 0x0) argument
243 #define TPWM_SET_PRESCALER(timer, prescaler) ((timer)->PWMCLKPSC = (prescaler)) argument
255 #define TPWM_GET_PRESCALER(timer) ((timer)->PWMCLKPSC) argument
269 #define TPWM_SET_PERIOD(timer, period) ((timer)->PWMPERIOD = (period)) argument
[all …]
Dtimer.h79 #define TIMER_SET_CMP_VALUE(timer, u32Value) ((timer)->CMP = (u32Value)) argument
93 #define TIMER_SET_PRESCALE_VALUE(timer, u32Value) ((timer)->CTL = ((timer)->CTL & ~TIMER_CTL_PSC_… argument
106 #define TIMER_IS_ACTIVE(timer) (((timer)->CTL & TIMER_CTL_ACTSTS_Msk)? 1 : 0) argument
121 #define TIMER_SELECT_TOUT_PIN(timer, u32ToutSel) ((timer)->CTL = ((timer)->CTL & ~TIMER_CTL_TGLP… argument
136 #define TIMER_SET_OPMODE(timer, u32OpMode) ((timer)->CTL = ((timer)->CTL & ~TIMER_CTL_OPMODE_Msk)… argument
139 __STATIC_INLINE void TIMER_Start(TIMER_T *timer);
140 __STATIC_INLINE void TIMER_Stop(TIMER_T *timer);
141 __STATIC_INLINE void TIMER_EnableWakeup(TIMER_T *timer);
142 __STATIC_INLINE void TIMER_DisableWakeup(TIMER_T *timer);
143 __STATIC_INLINE void TIMER_StartCapture(TIMER_T *timer);
[all …]
/hal_nuvoton-latest/m46x/StdDriver/src/
Dtimer_pwm.c39 void TPWM_SetCounterClockSource(TIMER_T *timer, uint32_t u32CntClkSrc) in TPWM_SetCounterClockSource() argument
41 (timer)->PWMCLKSRC = ((timer)->PWMCLKSRC & ~TIMER_PWMCLKSRC_CLKSRC_Msk) | u32CntClkSrc; in TPWM_SetCounterClockSource()
56 uint32_t TPWM_ConfigOutputFreqAndDuty(TIMER_T *timer, uint32_t u32Frequency, uint32_t u32DutyCycle) in TPWM_ConfigOutputFreqAndDuty() argument
61 if((timer == TIMER0) || (timer == TIMER1)) in TPWM_ConfigOutputFreqAndDuty()
85timer->PWMCTL = (timer->PWMCTL & ~TIMER_PWMCTL_CNTTYPE_Msk) | (TPWM_UP_COUNT << TIMER_PWMCTL_CNTTY… in TPWM_ConfigOutputFreqAndDuty()
88 timer->PWMCTL = (timer->PWMCTL & ~TIMER_PWMCTL_CNTMODE_Msk) | TPWM_AUTO_RELOAD_MODE; in TPWM_ConfigOutputFreqAndDuty()
91 TPWM_SET_PRESCALER(timer, (u32Prescaler - 1UL)); in TPWM_ConfigOutputFreqAndDuty()
93 TPWM_SET_PERIOD(timer, (u32Period - 1UL)); in TPWM_ConfigOutputFreqAndDuty()
103 TPWM_SET_CMPDAT(timer, u32CMP); in TPWM_ConfigOutputFreqAndDuty()
119 void TPWM_EnableDeadTime(TIMER_T *timer, uint32_t u32DTCount) in TPWM_EnableDeadTime() argument
[all …]
Dtimer.c42 uint32_t TIMER_Open(TIMER_T *timer, uint32_t u32Mode, uint32_t u32Freq) in TIMER_Open() argument
44 uint32_t u32Clk = TIMER_GetModuleClock(timer); in TIMER_Open()
60 timer->CTL = u32Mode | u32Prescale; in TIMER_Open()
61 timer->CMP = u32Cmpr; in TIMER_Open()
75 void TIMER_Close(TIMER_T *timer) in TIMER_Close() argument
77 timer->CTL = 0UL; in TIMER_Close()
78 timer->EXTCTL = 0UL; in TIMER_Close()
94 int32_t TIMER_Delay(TIMER_T *timer, uint32_t u32Usec) in TIMER_Delay() argument
96 uint32_t u32Clk = TIMER_GetModuleClock(timer); in TIMER_Delay()
101 timer->CTL = 0UL; in TIMER_Delay()
[all …]
/hal_nuvoton-latest/m48x/StdDriver/src/
Dtimer_pwm.c38 void TPWM_SetCounterClockSource(TIMER_T *timer, uint32_t u32CntClkSrc) in TPWM_SetCounterClockSource() argument
40 (timer)->PWMCLKSRC = ((timer)->PWMCLKSRC & ~TIMER_PWMCLKSRC_CLKSRC_Msk) | u32CntClkSrc; in TPWM_SetCounterClockSource()
55 uint32_t TPWM_ConfigOutputFreqAndDuty(TIMER_T *timer, uint32_t u32Frequency, uint32_t u32DutyCycle) in TPWM_ConfigOutputFreqAndDuty() argument
60 if((timer == TIMER0) || (timer == TIMER1)) in TPWM_ConfigOutputFreqAndDuty()
84timer->PWMCTL = (timer->PWMCTL & ~TIMER_PWMCTL_CNTTYPE_Msk) | (TPWM_UP_COUNT << TIMER_PWMCTL_CNTTY… in TPWM_ConfigOutputFreqAndDuty()
87 timer->PWMCTL = (timer->PWMCTL & ~TIMER_PWMCTL_CNTMODE_Msk) | TPWM_AUTO_RELOAD_MODE; in TPWM_ConfigOutputFreqAndDuty()
90 TPWM_SET_PRESCALER(timer, (u32Prescaler - 1UL)); in TPWM_ConfigOutputFreqAndDuty()
92 TPWM_SET_PERIOD(timer, (u32Period - 1UL)); in TPWM_ConfigOutputFreqAndDuty()
102 TPWM_SET_CMPDAT(timer, u32CMP); in TPWM_ConfigOutputFreqAndDuty()
118 void TPWM_EnableDeadTime(TIMER_T *timer, uint32_t u32DTCount) in TPWM_EnableDeadTime() argument
[all …]
Dtimer.c41 uint32_t TIMER_Open(TIMER_T *timer, uint32_t u32Mode, uint32_t u32Freq) in TIMER_Open() argument
43 uint32_t u32Clk = TIMER_GetModuleClock(timer); in TIMER_Open()
59 timer->CTL = u32Mode | u32Prescale; in TIMER_Open()
60 timer->CMP = u32Cmpr; in TIMER_Open()
74 void TIMER_Close(TIMER_T *timer) in TIMER_Close() argument
76 timer->CTL = 0UL; in TIMER_Close()
77 timer->EXTCTL = 0UL; in TIMER_Close()
92 void TIMER_Delay(TIMER_T *timer, uint32_t u32Usec) in TIMER_Delay() argument
94 uint32_t u32Clk = TIMER_GetModuleClock(timer); in TIMER_Delay()
99 timer->CTL = 0UL; in TIMER_Delay()
[all …]
/hal_nuvoton-latest/m2l31x/StdDriver/src/
Dtimer.c42 uint32_t TIMER_Open(TIMER_T *timer, uint32_t u32Mode, uint32_t u32Freq) in TIMER_Open() argument
44 uint32_t u32Clk = TIMER_GetModuleClock(timer); in TIMER_Open()
60 timer->CTL = u32Mode | u32Prescale; in TIMER_Open()
61 timer->CMP = u32Cmpr; in TIMER_Open()
76 void TIMER_Close(TIMER_T *timer) in TIMER_Close() argument
78 timer->CTL = 0UL; in TIMER_Close()
79 timer->EXTCTL = 0UL; in TIMER_Close()
97 int32_t TIMER_Delay(TIMER_T *timer, uint32_t u32Usec) in TIMER_Delay() argument
99 uint32_t u32Clk = TIMER_GetModuleClock(timer); in TIMER_Delay()
104 timer->CTL = 0UL; in TIMER_Delay()
[all …]
Dtimer_pwm.c36 uint32_t TPWM_ConfigOutputFreqAndDuty(TIMER_T *timer, uint32_t u32Frequency, uint32_t u32DutyCycle) in TPWM_ConfigOutputFreqAndDuty() argument
41 if ((timer == TIMER0) || (timer == TIMER1)) in TPWM_ConfigOutputFreqAndDuty()
72timer->PWMCTL = (timer->PWMCTL & ~TIMER_PWMCTL_CNTMODE_Msk) | (TPWM_AUTO_RELOAD_MODE << TIMER_PWMC… in TPWM_ConfigOutputFreqAndDuty()
75 TPWM_SET_PRESCALER(timer, (u32Prescaler - 1UL)); in TPWM_ConfigOutputFreqAndDuty()
77 TPWM_SET_PERIOD(timer, (u32Period - 1UL)); in TPWM_ConfigOutputFreqAndDuty()
88 TPWM_SET_CMPDAT(timer, u32CMP); in TPWM_ConfigOutputFreqAndDuty()
101 void TPWM_EnableCounter(TIMER_T *timer) in TPWM_EnableCounter() argument
103 timer->PWMCTL |= TIMER_PWMCTL_CNTEN_Msk; in TPWM_EnableCounter()
115 void TPWM_DisableCounter(TIMER_T *timer) in TPWM_DisableCounter() argument
117 timer->PWMCTL &= ~TIMER_PWMCTL_CNTEN_Msk; in TPWM_DisableCounter()
[all …]
/hal_nuvoton-latest/m2l31x/StdDriver/
DCMakeLists.txt18 zephyr_library_sources_ifdef(CONFIG_HAS_NUMAKER_TMR src/timer.c)
/hal_nuvoton-latest/m48x/Devices/M480/Source/IAR/
Dstartup_M480.s57 DCD WDT_IRQHandler ; 8: Watchdog timer
58 DCD WWDT_IRQHandler ; 9: Window watchdog timer
/hal_nuvoton-latest/m48x/Devices/M480/Source/ARM/
Dstartup_M480.s78 DCD WDT_IRQHandler ; 8: Watchdog timer
79 DCD WWDT_IRQHandler ; 9: Window watchdog timer