26 #ifdef DRV_TIM_MODULE_ENABLED 80 #ifndef DRV_HANDLE_CHECK_INACTIVE 84 #define DRV_HANDLE_CHECK(handle)\ 86 return DRV_ERROR_PARAM; \ 88 if((handle)->ptDevice.ptGpio == 0 || \ 89 (handle)->tConfiguration.eDeviceID < DRV_TIM_DEVICE_ID_GPIOCNTR_MIN || \ 90 (handle)->tConfiguration.eDeviceID > DRV_TIM_DEVICE_ID_SYSTIME_MAX){ \ 91 return DRV_ERROR_PARAM; \ 97 #define DRV_HANDLE_CHECK(handle) 775 for(; ulTickCnt > 0; ulTickCnt--)
816 for(; ulTickCnt > 0; ulTickCnt--)
853 volatile uint32_t ulDummy;
876 for(; ulTickCnt > 0; ulTickCnt--)
1095 *peState = ptTim->
eState;
1151 if(ptSoftwareValue != NULL)
1156 if(ptHardwareValue != NULL)
1175 if(ptSoftwareValue != NULL)
1180 if(ptHardwareValue != NULL)
1193 if(ptSoftwareValue != NULL)
1197 if(ptHardwareValue != NULL)
1203 volatile uint32_t ulDummy;
1211 if(ptSoftwareValue != NULL)
1216 if(ptHardwareValue != NULL)
1227 if(ptSoftwareValue != NULL)
1231 if(ptHardwareValue != NULL)
1239 if(ptSoftwareValue != NULL)
1243 if(ptHardwareValue != NULL)
1251 if(ptSoftwareValue != NULL)
1255 if(ptHardwareValue != NULL)
#define gpio_xpic_app_gpio_app_cnt_irq_raw_cnt2_Msk
#define DRV_SYSTIME_LT_DEVICE
__IM uint32_t timer_systime_ns
DRV_STATUS_E DRV_TIM_ChannelSetThreshold(DRV_TIM_HANDLE_T *const ptTim, DRV_DIO_ID_T ulChannelID, uint32_t ulTC)
This function sets the threshold used for the specified channel.
void TIM1_IRQHandler(void)
This function handles interrupts requests.
DRV_STATUS_E DRV_TIM_GetValue(DRV_TIM_HANDLE_T *const ptTim, uint32_t *const ptSoftwareValue, uint32_t *const ptHardwareValue)
Stores the current counter value.
static void * s_apTIMCallbackHandleTable[DRV_TIM_IRQ_COUNT]
__IOM uint32_t timer_timer[3]
__IOM uint32_t gpio_app_counter_cnt[3]
#define DRV_LOCK_INITIALIZER
Initializer of the type to be locked as rvalue is in default the mutex initializer.
struct timer_app_Type::@5281::@5295 timer_irq_msk_set_b
#define DRV_DIO_MSK_GPIO_0
void DRV_NVIC_DisableIRQ(IRQn_Type IRQn)
This method disables a given interrupt.
DRV_SYSTIME_LT_DEVICE_T * ptSystimlt
DRV_STATUS_E DRV_TIM_SetPreload(DRV_TIM_HANDLE_T *const ptTim, DRV_TIM_PRELOAD_VALUE_E tCounterValue)
Sets a new preload value.
static IRQn_Type const aulIRQnTable[DRV_TIM_IRQ_COUNT]
Table of the IRQ vector numbers.
DRV_STATUS_E DRV_TIM_Pause(DRV_TIM_HANDLE_T *const ptTim)
Pauses the TIM generation.
#define DRV_TIM_IRQ_COUNT
struct gpio_app_Type::@5163::@5193 gpio_app_cfg_b[8]
DRV_STATUS_E DRV_TIM_GetState(DRV_TIM_HANDLE_T *const ptTim, DRV_TIM_STATE_E *const peState)
Stores the state of the given counter.
__IOM uint32_t gpio_app_counter_max[3]
__IM uint32_t timer_systime_s
struct timer_app_Type::@5265::@5287 timer_config_timer_b[3]
#define SysTick_CTRL_COUNTFLAG_Msk
DRV_STATUS_E DRV_TIM_Start(DRV_TIM_HANDLE_T *const ptTim)
Starts the TIM generation.
DRV_TIM_PRELOAD_VALUE_E tPreloadValue
void DRV_NVIC_EnableIRQ(IRQn_Type IRQn)
This method enables a given interrupt.
DRV_STATUS_E DRV_TIM_Init(DRV_TIM_HANDLE_T *const ptTim)
Initializes the TIM Base peripheral.
void DRV_TIM_GPIOTIM0_Callback(void)
This is the callback of the GPIOTIM 0 IRQ.
void SysTick_Handler(void)
This function handles interrupts requests.
DRV_STATUS_E DRV_TIM_ChannelGetCapture(DRV_TIM_HANDLE_T *const ptTim, DRV_DIO_ID_T ulChannelID, uint32_t *const ulValue)
This function gets the captured value of the specified channel.
__IOM uint32_t gpio_app_cnt_irq_raw
DRV_DIO_ID_T eDioIdInputReference
void TIM0_IRQHandler(void)
This function handles interrupts requests.
#define DRV_DIO_LINE_MSK_GPIO
void GPIOTIM0_IRQHandler(void)
This function handles interrupts requests.
static DRV_CALLBACK_F s_apTIMCallbackTable[DRV_TIM_IRQ_COUNT]
Used for mapping the handle to an interrupt.
void DRV_TIM_TIMER1_Callback(void)
This is the callback of the TIMER 1 IRQ.
#define timer_app_timer_irq_masked_timer1_irq_Msk
DRV_TIM_EXTERNAL_EVENT_TRIGGER_E eExternalEventTrigger
DRV_STATUS_E DRV_TIM_Stop(DRV_TIM_HANDLE_T *const ptTim)
Stops the TIM generation.
#define DRV_LOCK(__HANDLE__)
A function calling the trylock of the mutex and returning locked in case it is blocked.
#define DRV_DIO_ID_GPIO_MIN
#define gpio_xpic_app_gpio_app_cnt_irq_raw_cnt1_Msk
#define gpio_xpic_app_gpio_app_cnt_irq_raw_cnt0_Msk
void DRV_TIM_TIMER2_Callback(void)
This is the callback of the TIMER 2 IRQ.
DRV_STATUS_E DRV_TIM_Wait(DRV_TIM_HANDLE_T *const ptTim, uint32_t ulTickCnt)
Waits at least until uSkipCnt events have occurred.
DRV_STATUS_E DRV_TIM_DeInit(DRV_TIM_HANDLE_T *const ptTim)
DeInitializes the TIM Base peripheral.
void DRV_TIM_GPIOTIM1_Callback(void)
This is the callback of the GPIOTIM 1 IRQ.
DRV_TIM_COUNTING_MODE_E eCountingMode
DRV_STATUS_E DRV_TIM_IRQAttach(DRV_TIM_HANDLE_T *const ptTim, DRV_CALLBACK_F pfnUserClb, void *pvUser)
Attaches a given callback to the counter.
DRV_TIM_PRELOAD_VALUE_E
Time structure of the timer driver.
DRV_GPIO_DEVICE_T * ptGpio
#define timer_app_timer_irq_masked_systime_s_irq_Msk
systime_lt_app (systime_lt_app)
struct timer_app_Type::@5283::@5296 timer_irq_msk_reset_b
This file contains all the functions prototypes for the peripheral module driver. ...
#define timer_app_timer_irq_masked_timer0_irq_Msk
Timer Base Handle Structure definition.
#define DRV_SYSTIME_COMPARE_IRQ
__IOM uint32_t gpio_app_cnt_irq_mask_set
__IOM uint32_t timer_irq_raw
void GPIOTIM1_IRQHandler(void)
This function handles interrupts requests.
#define UNUSED(x)
If there is the need to outsmart the compiler or linter.
DRV_TIM_DEVICE_ID_E eDeviceID
__IOM uint32_t gpio_app_tc[8]
void DRV_TIM_SYSTIME_COMPARE_Callback(void)
This is the callback of the SYSTIME COMPARE IRQ.
#define DRV_DIO_ID_GPIO_MAX
DRV_TIM_CONFIGURATION_T tConfiguration
Structure type to access the System Timer (SysTick).
uint32_t DRV_DIO_ID_T
Type definition for the driver io channel ids.
void(* DRV_CALLBACK_F)(void *pvDriverHandle, void *pvUserHandle)
The definition of callbacks used in the driver.
void GPIOTIM2_IRQHandler(void)
This function handles interrupts requests.
DRV_STATUS_E
DRV Status structures definition.
DRV_TIM_SYMMETRIC_E eSymmetric
#define DRV_HANDLE_CHECK(handle)
void TIM2_IRQHandler(void)
This function handles interrupts requests.
void DRV_TIM_ARMSYSTICK_Callback(void)
This is the callback of the SYSTEM TICK IRQ.
void DRV_NVIC_ClearPendingIRQ(IRQn_Type IRQn)
This method clears the pending state of a given interrupt.
void SYSTIME_IRQHandler(void)
This function handles interrupts requests.
DRV_DIO_MSK_T eDioMskOutputReference
struct gpio_app_Type::@5167::@5195 gpio_app_counter_ctrl_b[3]
void DRV_TIM_GPIOTIM2_Callback(void)
This is the callback of the GPIOTIM 2 IRQ.
#define DRV_UNLOCK(__HANDLE__)
The release function used.
#define SysTick_CTRL_CLKSOURCE_Msk
#define SysTick_CTRL_ENABLE_Msk
#define DRV_GPIO_COUNTER_IRQs
struct timer_app_Type::@5277::@5293 timer_irq_raw_b
__IOM uint32_t timer_irq_msk_set
DRV_TIM_STATE_E
Enumeration of the timer State.
static volatile uint32_t s_apTIMIrqCntr[DRV_TIM_IRQ_COUNT]
__IOM uint32_t timer_compare_systime_s_value
__IOM uint32_t gpio_app_cnt_irq_mask_rst
void DRV_TIM_TIMER0_Callback(void)
This is the callback of the TIMER 0 IRQ.
DRV_OPERATION_MODE_E eOperationMode
__IOM uint32_t timer_preload_timer[3]
DRV_TIM_EXTERNAL_EVENT_MODE_E eExternalEventMode
#define timer_app_timer_irq_masked_timer2_irq_Msk
#define SysTick_CTRL_TICKINT_Msk
__IOM uint32_t timer_irq_msk_reset
DRV_TIM_DEVICE_U ptDevice
DRV_TIMER_DEVICE_T * ptTimer
static DRV_TIM_HANDLE_T * s_apTIMCallbackDriverHandleTable[DRV_TIM_IRQ_COUNT]
DRV_TIM_SYSTIME_REFERENCE_E eSystimeReference