| #ifndef __DXS_TIMER_H__ |
| #define __DXS_TIMER_H__ |
| /****************************************************************************** |
| |
| Copyright (c) 2014-2015 Lantiq Deutschland GmbH |
| Copyright (c) 2015-2016 Lantiq Beteiligungs-GmbH & Co.KG |
| Copyright 2016, Intel Corporation. |
| |
| For licensing information, see the file 'LICENSE' in the root folder of |
| this software module. |
| |
| ******************************************************************************/ |
| |
| /** |
| \file dxs_timer.h |
| This file contains the declaration of the functions for timers. |
| */ |
| |
| /* ========================================================================== */ |
| /* Includes */ |
| /* ========================================================================== */ |
| #include <stdint.h> |
| |
| /* ========================================================================== */ |
| /* Macro definitions */ |
| /* ========================================================================== */ |
| #define DXS_TM_SUCCESS 0 |
| #define DXS_TM_ERROR (-1) |
| |
| /* ========================================================================== */ |
| /* Type definitions */ |
| /* ========================================================================== */ |
| typedef enum |
| { |
| DXS_TM_FALSE = 0, |
| DXS_TM_TRUE |
| } DXS_TM_BOOL_t; |
| |
| typedef void* Timer_ID; |
| typedef void (*TIMER_ENTRY)(Timer_ID timer_id, void *arg); |
| |
| |
| /* ========================================================================== */ |
| /* Function prototypes */ |
| /* ========================================================================== */ |
| extern Timer_ID DXS_TimerCreate(TIMER_ENTRY pTimerEntry, void *nArgument); |
| extern DXS_TM_BOOL_t DXS_TimerSet(Timer_ID Timer, |
| uint32_t nTime, |
| DXS_TM_BOOL_t bPeriodically, |
| DXS_TM_BOOL_t bRestart); |
| extern DXS_TM_BOOL_t DXS_TimerStop(Timer_ID Timer); |
| extern DXS_TM_BOOL_t DXS_TimerDestroy(Timer_ID Timer); |
| |
| #endif /* __DXS_TIMER_H__ */ |