Bar Logo Dual Active Bridge Development Board (Part-No. )
 
Content
     
Loading...
Searching...
No Matches
os_sys_time.h
1
2//=======================================================================================================
3// @file os_sys_time.h
4//
5// @brief contains the function for the system time
6//
7// @note counting up the time can/should be done in the interrupt routine of the scheduler
8// reading the time can also be done outside of the interrupt without any conflicts
9//
10// @author M52409
11//
12// @date 2019-08-09
13//=======================================================================================================
14
15#ifndef OS_SYS_TIME_H
16#define OS_SYS_TIME_H
17
18#include <stdint.h>
19
20#ifdef __cplusplus
21extern "C" {
22#endif /* __cplusplus */
23
24
25typedef struct
26{
27 uint16_t millisecond;
28 uint8_t second;
29 uint8_t minute;
30 uint8_t hour;
32
33
34//=======================================================================================================
35// @brief call this function every millisecond from the interrupt in your scheduler
36//=======================================================================================================
37void OS_SysTime_IncrementTime_1ms(void);
38
39//=======================================================================================================
40// @brief function to reset the time to zero
41// @ note use this function at boot up time or in the init function of your scheduler
42//=======================================================================================================
43void OS_SysTime_ResetTime(void);
44
45//=======================================================================================================
46// @brief function to reset the time to zero
47// @ note use this function at boot up time or in the init function of your scheduler
48//=======================================================================================================
49void OS_SysTime_GetTime(OS_SYSTIME_t* retVal);
50
51
52
53
54
55
56#ifdef __cplusplus
57}
58#endif // __cplusplus
59#endif // OS_SYS_TIME_H
60
uint16_t millisecond
Definition os_sys_time.h:27
uint8_t second
Definition os_sys_time.h:28
uint8_t minute
Definition os_sys_time.h:29
uint8_t hour
Definition os_sys_time.h:30