Lines Matching refs:timer
36 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()
72 …timer->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()
137 void TPWM_EnableTrigger(TIMER_T *timer, uint32_t u32TargetMask, uint32_t u32Condition) in TPWM_EnableTrigger() argument
139 …timer->PWMTRGCTL &= ~(TIMER_PWMTRGCTL_PWMTRGDAC_Msk | TIMER_PWMTRGCTL_PWMTRGEADC_Msk | TIMER_PWMTR… in TPWM_EnableTrigger()
140 timer->PWMTRGCTL |= (u32TargetMask) | (u32Condition); in TPWM_EnableTrigger()
157 void TPWM_DisableTrigger(TIMER_T *timer, uint32_t u32TargetMask) in TPWM_DisableTrigger() argument
159 timer->PWMTRGCTL &= ~(u32TargetMask); in TPWM_DisableTrigger()
172 void TPWM_EnableAcc(TIMER_T *timer, uint32_t u32IntFlagCnt, uint32_t u32IntAccSrc) in TPWM_EnableAcc() argument
174 …timer->PWMIFA = (((timer)->PWMIFA & ~(TIMER_PWMIFA_IFACNT_Msk | TIMER_PWMIFA_IFASEL_Msk | TIMER_PW… in TPWM_EnableAcc()
184 void TPWM_DisableAcc(TIMER_T *timer) in TPWM_DisableAcc() argument
186 timer->PWMIFA &= ~TIMER_PWMIFA_IFAEN_Msk; in TPWM_DisableAcc()
195 void TPWM_EnableAccInt(TIMER_T *timer) in TPWM_EnableAccInt() argument
197 timer->PWMAINTEN |= TIMER_PWMAINTEN_IFAIEN_Msk; in TPWM_EnableAccInt()
206 void TPWM_DisableAccInt(TIMER_T *timer) in TPWM_DisableAccInt() argument
208 timer->PWMAINTEN &= ~TIMER_PWMAINTEN_IFAIEN_Msk; in TPWM_DisableAccInt()
217 void TPWM_ClearAccInt(TIMER_T *timer) in TPWM_ClearAccInt() argument
219 timer->PWMAINTSTS = TIMER_PWMAINTSTS_IFAIF_Msk; in TPWM_ClearAccInt()
229 uint32_t TPWM_GetAccInt(TIMER_T *timer) in TPWM_GetAccInt() argument
231 return (((timer)->PWMAINTSTS & TIMER_PWMAINTSTS_IFAIF_Msk)? 1UL : 0UL); in TPWM_GetAccInt()
240 void TPWM_EnableAccPDMA(TIMER_T *timer) in TPWM_EnableAccPDMA() argument
242 timer->PWMAPDMACTL |= TIMER_PWMAPDMACTL_APDMAEN_Msk; in TPWM_EnableAccPDMA()
251 void TPWM_DisableAccPDMA(TIMER_T *timer) in TPWM_DisableAccPDMA() argument
253 timer->PWMAPDMACTL &= ~TIMER_PWMAPDMACTL_APDMAEN_Msk; in TPWM_DisableAccPDMA()
262 void TPWM_EnableAccStopMode(TIMER_T *timer) in TPWM_EnableAccStopMode() argument
264 timer->PWMIFA |= TIMER_PWMIFA_STPMOD_Msk; in TPWM_EnableAccStopMode()
273 void TPWM_DisableAccStopMode(TIMER_T *timer) in TPWM_DisableAccStopMode() argument
275 timer->PWMIFA &= ~TIMER_PWMIFA_STPMOD_Msk; in TPWM_DisableAccStopMode()