SYSTIMER: SYSTIMER.h Source File

Modbus RTU XMC47

SYSTIMER.h
Go to the documentation of this file.
1 
72 /***********************************************************************************************************************
73  * HEADER FILES
74  **********************************************************************************************************************/
75 
76 #ifndef SYSTIMER_H
77 #define SYSTIMER_H
78 
79 #include "xmc_common.h"
80 #include <DAVE_Common.h>
81 #include "systimer_conf.h"
82 
83 /**********************************************************************************************************************
84  * MACROS
85  **********************************************************************************************************************/
86 
87 #if (!((XMC_LIB_MAJOR_VERSION == 2U) && \
88  (XMC_LIB_MINOR_VERSION >= 0U) && \
89  (XMC_LIB_PATCH_VERSION >= 0U)))
90 #error "SYSTIMER requires XMC Peripheral Library v2.0.0 or higher"
91 #endif
92 
93 /**********************************************************************************************************************
94  * ENUMS
95  **********************************************************************************************************************/
96 
105 typedef enum SYSTIMER_STATUS
106 {
110 
114 typedef enum SYSTIMER_STATE
115 {
120 
124 typedef enum SYSTIMER_MODE
125 {
129 
134 /**********************************************************************************************************************
135 * DATA STRUCTURES
136 **********************************************************************************************************************/
145 typedef void (*SYSTIMER_CALLBACK_t)(void *args);
146 
151 typedef struct SYSTIMER
152 {
153  bool init_status;
154 } SYSTIMER_t;
159 /***********************************************************************************************************************
160  * API Prototypes
161  **********************************************************************************************************************/
162 
163 /* Support for C++ codebase */
164 #ifdef __cplusplus
165 extern "C" {
166 #endif
167 
200 DAVE_APP_VERSION_t SYSTIMER_GetAppVersion(void);
201 
239 
247 void SYSTIMER_Start(void);
248 
256 void SYSTIMER_Stop(void);
257 
325 uint32_t SYSTIMER_CreateTimer
326 (
327  uint32_t period,
328  SYSTIMER_MODE_t mode,
329  SYSTIMER_CALLBACK_t callback,
330  void *args
331 );
332 
345 (
346  uint32_t period,
347  SYSTIMER_MODE_t mode,
348  SYSTIMER_CALLBACK_t callback,
349  void *args
350 );
351 
407 
415 
485 
493 
576 SYSTIMER_STATUS_t SYSTIMER_RestartTimer(uint32_t id, uint32_t microsec);
577 
585 SYSTIMER_STATUS_t SYSTIMER_RestartTimerFromISR(uint32_t id, uint32_t microsec);
586 
668 
676 
734 uint32_t SYSTIMER_GetTime(void);
735 
796 uint32_t SYSTIMER_GetTickCount(void);
797 
879 
884 /* Support for C++ codebase */
885 #ifdef __cplusplus
886 }
887 #endif
888 
889 /* Inclusion of APP extern file */
890 #include "systimer_extern.h"
891 
892 #endif /* SYSTIMER_H */