| BlueNRG-1 HAL drivers APIs

- Main Page
- Classes
- Files

- File List
- File Members

gp_timer.h
Go to the documentation of this file.
1
21 #ifndef __GP_TIMER_H__
22 #define __GP_TIMER_H__
23
24 #include "clock.h"
25
30 struct timer {
31
32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
33
34 tClockTime start;
35 tClockTime interval;
36
37 #endif
38 };
39
50 void Timer_Set(struct timer *t, tClockTime interval);
51
63 void Timer_Reset(struct timer *t);
64
75 void Timer_Restart(struct timer *t);
76
85 int Timer_Expired(struct timer *t);
86
94 tClockTime Timer_Remaining(struct timer *t);
95
96 #endif /* __GP_TIMER_H__ */
timer
A structure that represents a timer. Use Timer_Set() to set the timer.
Definition: gp_timer.h:30
clock.h
Header file for clock APIs based on SySTick.
Timer_Expired
int Timer_Expired(struct timer *t)
This function tests if a timer has expired and returns true or false depending on its status...
Timer_Remaining
tClockTime Timer_Remaining(struct timer *t)
This function returns the time until the timer expires.
Timer_Reset
void Timer_Reset(struct timer *t)
This function resets the timer with the same interval that was given to the timer_set() function...
Timer_Set
void Timer_Set(struct timer *t, tClockTime interval)
This function sets a timer for a time sometime in the future. The function timer_expired() will evalu...
Timer_Restart
void Timer_Restart(struct timer *t)
This function restarts a timer with the same interval that was given to the timer_set() function...
tClockTime
uint32_t tClockTime
Definition: clock.h:31