Bar Logo 4kW dsPIC33C PSFB DC-DC DA (Part-No. )
 
Content
     
Loading...
Searching...
No Matches
os_sys_time.h
1//=======================================================================================================
2// Copyright(c) 2019 Microchip Technology Inc. and its subsidiaries.
3// Subject to your compliance with these terms, you may use Microchip software and any derivatives
4// exclusively with Microchip products. It is your responsibility to comply with third party license
5// terms applicable to your use of third-party software (including open source software) that may
6// accompany Microchip software.
7// THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY,
8// APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND
9// FITNESS FOR A PARTICULAR PURPOSE.
10// IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
11// LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
12// MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
13// ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT
14// EXCEED THE AMOUNT OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
15//=======================================================================================================
16
17//=======================================================================================================
18// @file os_sys_time.h
19//
20// @brief contains the function for the system time
21//
22// @note counting up the time can/should be done in the interrupt routine of the scheduler
23// reading the time can also be done outside of the interrupt without any conflicts
24//
25// @author M52409
26//
27// @date 2019-08-09
28//=======================================================================================================
29
30#ifndef OS_SYS_TIME_H
31#define OS_SYS_TIME_H
32
33#include <stdint.h>
34
35#ifdef __cplusplus
36extern "C" {
37#endif /* __cplusplus */
38
39
40typedef struct
41{
42 uint16_t millisecond;
43 uint8_t second;
44 uint8_t minute;
45 uint8_t hour;
47
48
49//=======================================================================================================
50// @brief call this function every millisecond from the interrupt in your scheduler
51//=======================================================================================================
52void OS_SysTime_IncrementTime_1ms(void);
53
54//=======================================================================================================
55// @brief function to reset the time to zero
56// @ note use this function at boot up time or in the init function of your scheduler
57//=======================================================================================================
58void OS_SysTime_ResetTime(void);
59
60//=======================================================================================================
61// @brief function to reset the time to zero
62// @ note use this function at boot up time or in the init function of your scheduler
63//=======================================================================================================
64void OS_SysTime_GetTime(OS_SYSTIME_t* retVal);
65
66
67
68
69
70
71#ifdef __cplusplus
72}
73#endif // __cplusplus
74#endif // OS_SYS_TIME_H
75
uint16_t millisecond
Definition os_sys_time.h:42
uint8_t second
Definition os_sys_time.h:43
uint8_t minute
Definition os_sys_time.h:44
uint8_t hour
Definition os_sys_time.h:45