forked from guiott/wordclock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
timeProc.h
49 lines (37 loc) · 937 Bytes
/
timeProc.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* File: TimeProc.h
* Author: guiott
*
* Created on 19 luglio 2014, 12.51
*/
#ifndef TIMEPROC_H
#define TIMEPROC_H
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
#include "common.h"
//RTC time
unsigned int Sec;
unsigned int Min;
unsigned int Hour;
//Time server time
unsigned char NtpSec;
unsigned char NtpMin;
unsigned char NtpHour;
extern unsigned char RXbuff[MAX_RX_BUFFER]; // RX buffer
extern unsigned char TimeSync; // Time has be syncronized?
void I2cHighService (void);
void I2cLowService (void);
void I2cSettings(void);
void I2cService (void);
unsigned char I2cBuffChk (unsigned char I2cDevice);
void I2cData (unsigned char DevPtr, unsigned char TxBytes,
unsigned char TX1, unsigned char TX2, unsigned char TX3,
unsigned char TX4, unsigned char RxBytes);
void RtcReadTime(void);
void RtcWriteTime(void);
void RtcInit(void);
#endif /* TIMEPROC_H */