blob: bcc8254045486125c112fca7106b3047ca1c84bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
/*******************************************************************************
* Copyright (C) ST-Ericsson SA 2011
* License terms: 3-clause BSD license
******************************************************************************/
#ifndef _T_TIME_UTILITIES_H_
#define _T_TIME_UTILITIES_H_
/**
* @addtogroup ldr_time_utilities
* @{
*/
/*******************************************************************************
* Types, constants
******************************************************************************/
/** MAX defined timers */
#define MAX_TIMERS 100
/** defined type of function pointer to the handle function */
typedef void (*HandleFunction_t)(void *Param_p, void *Timer_p, void *Data_p);
/**
* Structure of timer data
*/
typedef struct {
uint32 Time; /**< Requested for timer time.*/
uint32 PeriodicalTime; /**< Requested periodical time for timer.*/
HandleFunction_t HandleFunction_p; /**< Callback function*/
void *Data_p; /**< Pointer to data. */
void *Param_p; /**< Extra parameters. */
} Timer_t;
/**
* Header for buffer of timers
*/
typedef struct {
uint32 MaxTimers;
uint32 ActiveTimers;
Timer_t *Timers_p;
} TimerHeader_t;
/** @} */
#endif /*_T_TIME_UTILITIES_H_*/
|