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
21
extern
"C"
{
22
#endif
/* __cplusplus */
23
24
25
typedef
struct
26
{
27
uint16_t
millisecond
;
28
uint8_t
second
;
29
uint8_t
minute
;
30
uint8_t
hour
;
31
}
OS_SYSTIME_t
;
32
33
34
//=======================================================================================================
35
// @brief call this function every millisecond from the interrupt in your scheduler
36
//=======================================================================================================
37
void
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
//=======================================================================================================
43
void
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
//=======================================================================================================
49
void
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
OS_SYSTIME_t
Definition
os_sys_time.h:26
OS_SYSTIME_t::millisecond
uint16_t millisecond
Definition
os_sys_time.h:27
OS_SYSTIME_t::second
uint8_t second
Definition
os_sys_time.h:28
OS_SYSTIME_t::minute
uint8_t minute
Definition
os_sys_time.h:29
OS_SYSTIME_t::hour
uint8_t hour
Definition
os_sys_time.h:30
© Copyright 1998-2022 Microchip Technology Inc. All rights reserved.