ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts  1.0
ESP8266ILI9341DisplayProject
rtc.h
Go to the documentation of this file.
1 
13 #ifndef _RTC_H_
14 #define _RTC_H_
15 
16 #define DS1307 0xd0
17 
18 /* rtc.c */
22 MEMSPACE int rtc_run ( int run );
23 MEMSPACE uint8_t rtc_init ( int force , time_t seconds );
26 
27 #endif
MEMSPACE int rtc_run(int run)
Set DS1307 run state.
Definition: rtc.c:87
MEMSPACE uint8_t BCDtoBIN(uint8_t data)
Convert two "digit" BCD number to binary.
Definition: rtc.c:48
MEMSPACE uint8_t rtc_init(int force, time_t seconds)
Initialize DS1307 rtc if not initialied - or if forced.
Definition: rtc.c:121
uint32_t time_t
type of EPOCH result.
Definition: time.h:35
MEMSPACE int8_t rtc_run_test(void)
Check if the DS1307 device is running.
Definition: rtc.c:63
signed char int8_t
MEMSPACE uint8_t rtc_read(tm_t *t)
Read DS1307 RTC into POSIX struct tm * structure.
Definition: rtc.c:238
POSIX struct tm.
Definition: time.h:41
MEMSPACE uint8_t BINtoBCD(uint8_t data)
Convert number >= 0 and <= 99 to BCD.
Definition: rtc.c:36
#define MEMSPACE
Definition: cpu.h:25
unsigned char uint8_t
Definition: send.c:17
time_t seconds
Definition: user_main.c:293
MEMSPACE uint8_t rtc_write(tm_t *t)
Set DS1307 RTC from POSIX struct tm * structure.
Definition: rtc.c:189