LibDriver DS1302
Loading...
Searching...
No Matches
driver_ds1302_advance.h
Go to the documentation of this file.
1
36
37#ifndef DRIVER_DS1302_ADVANCE_H
38#define DRIVER_DS1302_ADVANCE_H
39
41#include <time.h>
42
43#ifdef __cplusplus
44extern "C"{
45#endif
46
51
60
68uint8_t ds1302_advance_init(void);
69
77uint8_t ds1302_advance_deinit(void);
78
88
97uint8_t ds1302_advance_set_timestamp(time_t timestamp);
98
106uint8_t ds1302_advance_set_timestamp_time_zone(int8_t zone);
107
117
126uint8_t ds1302_advance_get_timestamp(time_t *timestamp);
127
135uint8_t ds1302_advance_get_timestamp_time_zone(int8_t *zone);
136
146uint8_t ds1302_advance_get_ascii_time(char *buf, uint8_t len);
147
158uint8_t ds1302_advance_read_ram(uint8_t addr, uint8_t *buf, uint8_t len);
159
170uint8_t ds1302_advance_write_ram(uint8_t addr, uint8_t *buf, uint8_t len);
171
182uint8_t ds1302_advance_set_charge(uint8_t charge);
183
192uint8_t ds1302_advance_get_charge(uint8_t *charge);
193
204uint8_t ds1302_advance_burst_write(ds1302_burst_type_t type, uint8_t *buf, uint8_t len);
205
216uint8_t ds1302_advance_burst_read(ds1302_burst_type_t type, uint8_t *buf, uint8_t len);
217
221
222#ifdef __cplusplus
223}
224#endif
225
226#endif
driver ds1302 interface header file
struct ds1302_time_s ds1302_time_t
ds1302 time structure definition
uint8_t ds1302_advance_burst_write(ds1302_burst_type_t type, uint8_t *buf, uint8_t len)
advance example burst write
uint8_t ds1302_advance_set_timestamp_time_zone(int8_t zone)
advance example set the local time zone
uint8_t ds1302_advance_get_timestamp_time_zone(int8_t *zone)
advance example get the local time zone
uint8_t ds1302_advance_set_timestamp(time_t timestamp)
advance example set the time by a unix timestamp
uint8_t ds1302_advance_deinit(void)
advance example deinit
uint8_t ds1302_advance_set_charge(uint8_t charge)
advance example set charge
uint8_t ds1302_advance_burst_read(ds1302_burst_type_t type, uint8_t *buf, uint8_t len)
advance example burst read
uint8_t ds1302_advance_get_time(ds1302_time_t *t)
advance example get the time
uint8_t ds1302_advance_read_ram(uint8_t addr, uint8_t *buf, uint8_t len)
advance example read ram
uint8_t ds1302_advance_get_charge(uint8_t *charge)
advance example get charge
uint8_t ds1302_advance_set_time(ds1302_time_t *t)
advance example set the time
uint8_t ds1302_advance_get_ascii_time(char *buf, uint8_t len)
advance example get the ascii time
uint8_t ds1302_advance_write_ram(uint8_t addr, uint8_t *buf, uint8_t len)
advance example write ram
uint8_t ds1302_advance_init(void)
advance example init
ds1302_burst_type_t
ds1302 burst type enumeration definition
uint8_t ds1302_advance_get_timestamp(time_t *timestamp)
advance example get the time in a unix timestamp
@ DS1302_BURST_TYPE_CLOCK
@ DS1302_BURST_TYPE_RAM