Searched refs:lptmr (Results 1 – 4 of 4) sorted by relevance
| /hal_nuvoton-latest/m2l31x/StdDriver/inc/ |
| D | lptmr_pwm.h | 78 #define LPTPWM_ENABLE_PWM_MODE(lptmr) ((lptmr)->CTL |= LPTMR_CTL_FUNCSEL_Msk) argument 91 #define LPTPWM_DISABLE_PWM_MODE(lptmr) ((lptmr)->CTL &= ~LPTMR_CTL_FUNCSEL_Msk) argument 103 #define LPTPWM_START_COUNTER(lptmr) ((lptmr)->PWMCTL |= LPTMR_PWMCTL_CNTEN_Msk) argument 115 #define LPTPWM_STOP_COUNTER(lptmr) ((lptmr)->PWMPERIOD = 0x0UL) argument 130 #define LPTPWM_SET_PRESCALER(lptmr, u32Prescaler) ((lptmr)->PWMCLKPSC = (u32Prescaler)) argument 142 #define LPTPWM_GET_PRESCALER(lptmr) ((lptmr)->PWMCLKPSC) argument 156 #define LPTPWM_SET_PERIOD(lptmr, u32Period) ((lptmr)->PWMPERIOD = (u32Period)) argument 168 #define LPTPWM_GET_PERIOD(lptmr) ((lptmr)->PWMPERIOD) argument 182 #define LPTPWM_SET_CMPDAT(lptmr, u32Cmp) ((lptmr)->PWMCMPDAT = (u32Cmp)) argument 194 #define LPTPWM_GET_CMPDAT(lptmr) ((lptmr)->PWMCMPDAT) argument [all …]
|
| D | lptmr.h | 111 #define LPTMR_SET_CMP_VALUE(lptmr, u32Value) ((lptmr)->CMP = (u32Value)) argument 125 #define LPTMR_SET_PRESCALE_VALUE(lptmr, u32Value) ((lptmr)->CTL = ((lptmr)->CTL & ~LPTMR_CTL_PSC_… argument 138 #define LPTMR_IS_ACTIVE(lptmr) (((lptmr)->CTL & LPTMR_CTL_ACTSTS_Msk)? 1 : 0) argument 153 #define LPTMR_SELECT_TOUT_PIN(lptmr, u32ToutSel) ((lptmr)->CTL = ((lptmr)->CTL & ~LPTMR_CTL_TGLP… argument 168 #define LPTMR_SET_OPMODE(lptmr, u32OpMode) ((lptmr)->CTL = ((lptmr)->CTL & ~LPTMR_CTL_OPMODE_Msk)… argument 171 __STATIC_INLINE void LPTMR_Start(LPTMR_T *lptmr); 172 __STATIC_INLINE void LPTMR_Stop(LPTMR_T *lptmr); 173 __STATIC_INLINE void LPTMR_EnableWakeup(LPTMR_T *lptmr); 174 __STATIC_INLINE void LPTMR_DisableWakeup(LPTMR_T *lptmr); 175 __STATIC_INLINE void LPTMR_StartCapture(LPTMR_T *lptmr); [all …]
|
| /hal_nuvoton-latest/m2l31x/StdDriver/src/ |
| D | lptmr.c | 41 uint32_t LPTMR_Open(LPTMR_T *lptmr, uint32_t u32Mode, uint32_t u32Freq) in LPTMR_Open() argument 43 uint32_t u32Clk = LPTMR_GetModuleClock(lptmr); in LPTMR_Open() 62 lptmr->CTL = (u32Mode | u32Prescale); in LPTMR_Open() 63 lptmr->CMP = u32Cmpr; in LPTMR_Open() 78 void LPTMR_Close(LPTMR_T *lptmr) in LPTMR_Close() argument 80 lptmr->CTL = 0UL; in LPTMR_Close() 81 lptmr->EXTCTL = 0UL; in LPTMR_Close() 98 int32_t LPTMR_Delay(LPTMR_T *lptmr, uint32_t u32Usec) in LPTMR_Delay() argument 100 uint32_t u32Clk = LPTMR_GetModuleClock(lptmr); in LPTMR_Delay() 105 lptmr->CTL = 0UL; in LPTMR_Delay() [all …]
|
| D | lptmr_pwm.c | 36 uint32_t LPTPWM_ConfigOutputFreqAndDuty(LPTMR_T *lptmr, uint32_t u32Frequency, uint32_t u32DutyCycl… in LPTPWM_ConfigOutputFreqAndDuty() argument 43 if (lptmr == LPTMR0) in LPTPWM_ConfigOutputFreqAndDuty() 47 else if (lptmr == LPTMR1) in LPTPWM_ConfigOutputFreqAndDuty() 76 …lptmr->PWMCTL = (lptmr->PWMCTL & ~LPTMR_PWMCTL_CNTMODE_Msk) | (LPTPWM_AUTO_RELOAD_MODE << LPTMR_PW… in LPTPWM_ConfigOutputFreqAndDuty() 79 LPTPWM_SET_PRESCALER(lptmr, (u32Prescaler - 1UL)); in LPTPWM_ConfigOutputFreqAndDuty() 81 LPTPWM_SET_PERIOD(lptmr, (u32Period - 1UL)); in LPTPWM_ConfigOutputFreqAndDuty() 92 LPTPWM_SET_CMPDAT(lptmr, u32CMP); in LPTPWM_ConfigOutputFreqAndDuty() 105 void LPTPWM_EnableCounter(LPTMR_T *lptmr) in LPTPWM_EnableCounter() argument 107 lptmr->PWMCTL |= LPTMR_PWMCTL_CNTEN_Msk; in LPTPWM_EnableCounter() 119 void LPTPWM_DisableCounter(LPTMR_T *lptmr) in LPTPWM_DisableCounter() argument [all …]
|