GPTIMER Driver API/interface file.
Go to the source code of this file.
Data Structures | |
struct | GPTIMER_HwAttrs |
GPTIMER Hardware attributes. More... | |
struct | GPTIMER_Params |
GPTIMER Parameters. More... | |
struct | GPTIMER_Compare_Config |
GPTIMER Compare Mode Configuration Parameters. More... | |
struct | GPTIMER_Capture_Config |
GPTIMER Capture Mode Configuration Parameters. More... | |
struct | GPTIMER_PWM_Config |
GPTIMER PWM Generation Mode Configuration Parameters. More... | |
struct | GPTIMER_Object |
GPTIMER driver object. More... | |
struct | GPTIMER_Config |
GPTIMER Global Configuration. More... | |
Macros | |
MACROS for the possible Configurations of GPTIMER. | |
#define | GPTIMER_MODE_CONFIG_FREE_RUN ((uint8_t) 0U) |
Free Running Mode. More... | |
#define | GPTIMER_MODE_CONFIG_INPUT_CAPTURE ((uint8_t) 1U) |
Input Capture Mode. More... | |
#define | GPTIMER_MODE_CONFIG_OUTPUT_COMPARE ((uint8_t) 2U) |
Output Compare Mode. More... | |
#define | GPTIMER_MODE_CONFIG_PWM_GEN ((uint8_t) 3U) |
PWM Generation Mode. More... | |
MACROS for the possible Configurations of GPTIMER input Capture Mode. | |
#define | GPTIMER_INPUT_CAPTURE_MODE_SINGLE ((uint32_t) 0U) |
Capture Single Event. More... | |
#define | GPTIMER_INPUT_CAPTURE_MODE_SECOND ((uint32_t) 1U) |
Capture Two Events. More... | |
MACROS for the possible Configurations of GPTIMER input Capture event. | |
#define | GPTIMER_INPUT_CAPTURE_EVENT_NO_CAPTURE ((uint32_t) 0U) |
No Event Capture. More... | |
#define | GPTIMER_INPUT_CAPTURE_EVENT_RISING ((uint32_t) 1U) |
Capture Event on Rising Edge. More... | |
#define | GPTIMER_INPUT_CAPTURE_EVENT_FALLING ((uint32_t) 2U) |
Capture Event on Falling Edge. More... | |
#define | GPTIMER_INPUT_CAPTURE_EVENT_EDGE ((uint32_t) 3U) |
Capture Event on both rising and falling edge. More... | |
MACROS for the possible Configurations of GPTIMER PWM output Trigger. | |
#define | GPTIMER_PWM_OUT_NO_TRIGGER ((uint32_t) 0U) |
PWM Uses No Trigger. More... | |
#define | GPTIMER_PWM_OUT_OVERFLOW_TRIGGER ((uint32_t) 1U) |
PWM uses overflow as a Trigger. More... | |
#define | GPTIMER_PWM_OUT_OVERFLOW_MATCH_TRIGGER ((uint32_t) 2U) |
PWM uses overflow and compare match as a trigger. More... | |
MACROS for the possible Configurations of PWM output Pin Default Val. | |
#define | GPTIMER_PWM_OUT_PIN_DEFAULT_0 ((uint32_t) 0U) |
Pin Default value 0. More... | |
#define | GPTIMER_PWM_OUT_PIN_DEFAULT_1 ((uint32_t) 1U) |
Pin Default value 0. More... | |
MACROS for the possible Configurations of PWM output Pin Modulation | |
#define | GPTIMER_PWM_OUT_PIN_MODULATION_PULSE ((uint32_t) 0U) |
Pin Modulation type Pulse. More... | |
#define | GPTIMER_PWM_OUT_PIN_MODULATION_TOGGLE ((uint32_t) 1U) |
Pin Modulation type Toggle. More... | |
MACROS for the possible IRQ Status Mask. | |
#define | TIMER_IRQ_TCAR_IT_FLAG_MASK (uint32_t)0x04U |
#define | TIMER_IRQ_OVF_IT_FLAG_MASK (uint32_t)0x02U |
#define | TIMER_IRQ_MAT_IT_FLAG_MASK (uint32_t)0x01U |
Typedefs | |
typedef struct GPTIMER_Config_s * | GPTIMER_Handle |
A handle that is returned from a GPTIMER_open() call. More... | |
typedef void(* | GPTIMER_OverflowCallbackFxn) (GPTIMER_Handle handle) |
GPTIMER Overflow Callback Function. More... | |
typedef void(* | GPTIMER_CompareMatchCallbackFxn) (GPTIMER_Handle handle) |
GPTIMER Compare Match Callback Function. More... | |
typedef void(* | GPTIMER_CaptureCallbackFxn) (GPTIMER_Handle handle) |
GPTIMER Capture Callback Function. More... | |
Functions | |
void | GPTIMER_init (void) |
Initialize the GPTIMER module. More... | |
void | GPTIMER_deinit (void) |
De-initialize the GPTIMER module. More... | |
void | GPTIMER_Params_init (GPTIMER_Params *params) |
Function to set default values of GPTIMER_Params in params. More... | |
GPTIMER_Handle | GPTIMER_open (uint32_t idx, const GPTIMER_Params *params) |
Open the GPTIMER at index idx with parameters params. More... | |
void | GPTIMER_close (GPTIMER_Handle handle) |
Function to close the GPTIMER Peripheral specified by the handle. More... | |
void | GPTIMER_start (GPTIMER_Handle handle) |
Start the Timer. More... | |
void | GPTIMER_stop (GPTIMER_Handle handle) |
Stop the TImer. More... | |
uint32_t | GPTIMER_getCount (GPTIMER_Handle handle) |
Get timer counter value. More... | |
void | GPTIMER_setCount (GPTIMER_Handle handle, uint32_t value) |
Set timer counter value. More... | |
void | GPTIMER_setCompareVal (GPTIMER_Handle handle, uint32_t value) |
Set timer compare value. More... | |
uint32_t | GPTIMER_getTimerCaptureVal1 (GPTIMER_Handle handle) |
Get Timer Capture Value 1. More... | |
uint32_t | GPTIMER_getTimerCaptureVal2 (GPTIMER_Handle handle) |
Get Timer Capture Value 2. More... | |
int32_t | GPTIMER_setTimerConfigMode (GPTIMER_Handle handle, uint32_t timerConfigMode, void *config) |
Change Timer Configuration. More... | |
void | GPTIMER_setCallbackFxn (GPTIMER_Handle handle, GPTIMER_OverflowCallbackFxn overflowCbFxn, GPTIMER_CompareMatchCallbackFxn compMatchCbFxn, GPTIMER_CaptureCallbackFxn captureCbFxn) |
Update Callback Functions. More... | |
uint32_t | GPTIMER_getIRQStatus (GPTIMER_Handle handle) |
Get IRQ status. More... | |
void | GPTIMER_clearIRQStatus (GPTIMER_Handle handle, uint32_t irqMask) |
Clear IRQ status bit. More... | |
void | GPTIMER_enableInterruptStatus (GPTIMER_Handle handle, uint32_t irqMask) |
Enable IRQ Status, Corresponding status bit will be set in case of an event. Interrupt and callback will be called if interrupt is registered. More... | |
void | GPTIMER_disableInterruptStatus (GPTIMER_Handle handle, uint32_t irqMask) |
Disable IRQ Status. More... | |