M480 BSP V3.05.006
The Board Support Package for M480 Series
Macros | Functions
timer.h File Reference

M480 series Timer Controller(Timer) driver header file. More...

Go to the source code of this file.

Macros

#define TIMER_ONESHOT_MODE
 
#define TIMER_PERIODIC_MODE
 
#define TIMER_TOGGLE_MODE
 
#define TIMER_CONTINUOUS_MODE
 
#define TIMER_TOUT_PIN_FROM_TMX
 
#define TIMER_TOUT_PIN_FROM_TMX_EXT
 
#define TIMER_COUNTER_EVENT_FALLING
 
#define TIMER_COUNTER_EVENT_RISING
 
#define TIMER_CAPTURE_FREE_COUNTING_MODE
 
#define TIMER_CAPTURE_COUNTER_RESET_MODE
 
#define TIMER_CAPTURE_EVENT_FALLING
 
#define TIMER_CAPTURE_EVENT_RISING
 
#define TIMER_CAPTURE_EVENT_FALLING_RISING
 
#define TIMER_CAPTURE_EVENT_RISING_FALLING
 
#define TIMER_CAPTURE_EVENT_GET_LOW_PERIOD
 
#define TIMER_CAPTURE_EVENT_GET_HIGH_PERIOD
 
#define TIMER_TRGSRC_TIMEOUT_EVENT
 
#define TIMER_TRGSRC_CAPTURE_EVENT
 
#define TIMER_TRG_TO_EPWM
 
#define TIMER_TRG_TO_EADC
 
#define TIMER_TRG_TO_DAC
 
#define TIMER_TRG_TO_PDMA
 
#define TIMER_TIMEOUT_ERR
 
#define TIMER_SET_CMP_VALUE(timer, u32Value)
 Set Timer Compared Value. More...
 
#define TIMER_SET_PRESCALE_VALUE(timer, u32Value)
 Set Timer Prescale Value. More...
 
#define TIMER_IS_ACTIVE(timer)
 Check specify Timer Status. More...
 
#define TIMER_SELECT_TOUT_PIN(timer, u32ToutSel)
 Select Toggle-output Pin. More...
 
#define TIMER_SET_OPMODE(timer, u32OpMode)
 Select Timer operating mode. More...
 

Functions

__STATIC_INLINE void TIMER_Start (TIMER_T *timer)
 Start Timer Counting. More...
 
__STATIC_INLINE void TIMER_Stop (TIMER_T *timer)
 Stop Timer Counting. More...
 
__STATIC_INLINE void TIMER_EnableWakeup (TIMER_T *timer)
 Enable Timer Interrupt Wake-up Function. More...
 
__STATIC_INLINE void TIMER_DisableWakeup (TIMER_T *timer)
 Disable Timer Wake-up Function. More...
 
__STATIC_INLINE void TIMER_StartCapture (TIMER_T *timer)
 Start Timer Capture Function. More...
 
__STATIC_INLINE void TIMER_StopCapture (TIMER_T *timer)
 Stop Timer Capture Function. More...
 
__STATIC_INLINE void TIMER_EnableCaptureDebounce (TIMER_T *timer)
 Enable Capture Pin De-bounce. More...
 
__STATIC_INLINE void TIMER_DisableCaptureDebounce (TIMER_T *timer)
 Disable Capture Pin De-bounce. More...
 
__STATIC_INLINE void TIMER_EnableEventCounterDebounce (TIMER_T *timer)
 Enable Counter Pin De-bounce. More...
 
__STATIC_INLINE void TIMER_DisableEventCounterDebounce (TIMER_T *timer)
 Disable Counter Pin De-bounce. More...
 
__STATIC_INLINE void TIMER_EnableInt (TIMER_T *timer)
 Enable Timer Time-out Interrupt. More...
 
__STATIC_INLINE void TIMER_DisableInt (TIMER_T *timer)
 Disable Timer Time-out Interrupt. More...
 
__STATIC_INLINE void TIMER_EnableCaptureInt (TIMER_T *timer)
 Enable Capture Trigger Interrupt. More...
 
__STATIC_INLINE void TIMER_DisableCaptureInt (TIMER_T *timer)
 Disable Capture Trigger Interrupt. More...
 
__STATIC_INLINE uint32_t TIMER_GetIntFlag (TIMER_T *timer)
 Get Timer Time-out Interrupt Flag. More...
 
__STATIC_INLINE void TIMER_ClearIntFlag (TIMER_T *timer)
 Clear Timer Time-out Interrupt Flag. More...
 
__STATIC_INLINE uint32_t TIMER_GetCaptureIntFlag (TIMER_T *timer)
 Get Timer Capture Interrupt Flag. More...
 
__STATIC_INLINE void TIMER_ClearCaptureIntFlag (TIMER_T *timer)
 Clear Timer Capture Interrupt Flag. More...
 
__STATIC_INLINE uint32_t TIMER_GetWakeupFlag (TIMER_T *timer)
 Get Timer Wake-up Flag. More...
 
__STATIC_INLINE void TIMER_ClearWakeupFlag (TIMER_T *timer)
 Clear Timer Wake-up Flag. More...
 
__STATIC_INLINE uint32_t TIMER_GetCaptureData (TIMER_T *timer)
 Get Capture value. More...
 
__STATIC_INLINE uint32_t TIMER_GetCounter (TIMER_T *timer)
 Get Counter value. More...
 
uint32_t TIMER_Open (TIMER_T *timer, uint32_t u32Mode, uint32_t u32Freq)
 Open Timer with Operate Mode and Frequency. More...
 
void TIMER_Close (TIMER_T *timer)
 Stop Timer Counting. More...
 
int32_t TIMER_Delay (TIMER_T *timer, uint32_t u32Usec)
 Create a specify Delay Time. More...
 
void TIMER_EnableCapture (TIMER_T *timer, uint32_t u32CapMode, uint32_t u32Edge)
 Enable Timer Capture Function. More...
 
void TIMER_DisableCapture (TIMER_T *timer)
 Disable Timer Capture Function. More...
 
void TIMER_EnableEventCounter (TIMER_T *timer, uint32_t u32Edge)
 Enable Timer Counter Function. More...
 
void TIMER_DisableEventCounter (TIMER_T *timer)
 Disable Timer Counter Function. More...
 
uint32_t TIMER_GetModuleClock (TIMER_T *timer)
 Get Timer Clock Frequency. More...
 
void TIMER_EnableFreqCounter (TIMER_T *timer, uint32_t u32DropCount, uint32_t u32Timeout, uint32_t u32EnableInt)
 This function is used to enable the Timer frequency counter function. More...
 
void TIMER_DisableFreqCounter (TIMER_T *timer)
 This function is used to disable the Timer frequency counter function. More...
 
void TIMER_SetTriggerSource (TIMER_T *timer, uint32_t u32Src)
 This function is used to select the interrupt source used to trigger other modules. More...
 
void TIMER_SetTriggerTarget (TIMER_T *timer, uint32_t u32Mask)
 This function is used to set modules trigger by timer interrupt. More...
 
int32_t TIMER_ResetCounter (TIMER_T *timer)
 Reset Counter. More...
 

Detailed Description

M480 series Timer Controller(Timer) driver header file.

Version
V1.00

SPDX-License-Identifier: Apache-2.0

Definition in file timer.h.