monoZ docs
MZ_timer.h
Go to the documentation of this file.
1
9#ifndef MZ_TIMER_H_
10#define MZ_TIMER_H_
11#ifdef __cplusplus
12extern "C" {
13#endif
14#include "MZ_error_handler.h"
15#include "MZ_sys_cmsis_os2.h"
16
17// Time MACROS
18#define AT_TIME_1SEC (1000)
19#define AT_TIME_2SEC (AT_TIME_1SEC * 2)
20#define AT_TIME_5SEC (AT_TIME_1SEC * 5)
21#define AT_TIME_10SEC (AT_TIME_1SEC * 10)
22#define AT_TIME_15SEC (AT_TIME_1SEC * 15)
23#define AT_TIME_20SEC (AT_TIME_1SEC * 20)
24#define AT_TIME_25SEC (AT_TIME_1SEC * 25)
25#define AT_TIME_30SEC (AT_TIME_1SEC * 30)
26#define AT_TIME_1MIN (AT_TIME_1SEC * 60)
27#define AT_TIME_2MIN (AT_TIME_1MIN * 2)
28#define AT_TIME_5MIN (AT_TIME_1MIN * 5)
29#define AT_TIME_10MIN (AT_TIME_1MIN * 10)
30
34typedef enum
35{
41
42#define MZ_TIMER_NOT_AVAILABLE (0xFFFF)
43
48typedef mz_timer_fp mz_tm_cb; /* mz_tm_cb variable of type mz_timer_fp */
49
50
63size_t mz_tm_create(char* _name,TickType_t _tick,UBaseType_t _auto,mz_tm_cb _cb);
64
73size_t mz_tm_create_one(char* _name,TickType_t _tick,mz_tm_cb _cb);
74
75
83size_t mz_tm_create_recursive(char* _name,TickType_t _tick,mz_tm_cb _cb);
84
85
92
93
102mz_error_t mz_tm_create_start(char* _name,TickType_t _tick,UBaseType_t _auto,mz_tm_cb _cb);
103
104
112mz_error_t mz_tm_create_start_one(char* _name,TickType_t _tick,mz_tm_cb _cb);
113
114
122mz_error_t mz_tm_create_start_recursive(char* _name,TickType_t _tick,mz_tm_cb _cb);
123
124
131
132
140#ifdef __cplusplus
141}
142#endif
143#endif /* MZ_TIMER_H_ */
monoZ Error Handler
mz_error_t
Enumeration of monoZ Error Flags.
monoZ system CMSIS OS2 This is an abstraction layer and includes FreeRTOS configuration,...
TimerCallbackFunction_t mz_timer_fp
mz_timer_fp variable of type TimerCallbackFunction_t
en_mz_tm
Enumeration for monoZ Timer.
Definition: MZ_timer.h:35
@ MZ_TM_START
Definition: MZ_timer.h:37
@ MZ_TM_EMPTY
Definition: MZ_timer.h:36
@ MZ_TM_STOP
Definition: MZ_timer.h:39
@ MZ_TM_RUNNING
Definition: MZ_timer.h:38
mz_timer_fp mz_tm_cb
[TODO]
Definition: MZ_timer.h:48
size_t mz_tm_create(char *_name, TickType_t _tick, UBaseType_t _auto, mz_tm_cb _cb)
Function to Create a Monoz Timer.
mz_error_t mz_tm_create_start_recursive(char *_name, TickType_t _tick, mz_tm_cb _cb)
Function to Create and Start One Shot Timers.
mz_error_t mz_tm_delete(size_t _id)
Function to Delete the Timer.
mz_error_t mz_tm_stop(size_t _id)
Function to STOP the Timer.
size_t mz_tm_create_recursive(char *_name, TickType_t _tick, mz_tm_cb _cb)
Function to Create a Recursive Timer.
mz_error_t mz_tm_create_start_one(char *_name, TickType_t _tick, mz_tm_cb _cb)
Function to Create and Start Recursive timers.
mz_error_t mz_tm_create_start(char *_name, TickType_t _tick, UBaseType_t _auto, mz_tm_cb _cb)
Function to Create and Start Timers.
mz_error_t mz_tm_start(size_t _id)
Function to Start the Timer.
size_t mz_tm_create_one(char *_name, TickType_t _tick, mz_tm_cb _cb)
Function to Create a One Shot Timer.