LibDriver DS3231
Loading...
Searching...
No Matches
driver_ds3231_output.h
Go to the documentation of this file.
1
37
38#ifndef DRIVER_DS3231_OUTPUT_H
39#define DRIVER_DS3231_OUTPUT_H
40
42#include <time.h>
43
44#ifdef __cplusplus
45extern "C"{
46#endif
47
52
56#define DS3231_OUTPUT_DEFAULT_AGING_OFFSET 0
57
65uint8_t ds3231_output_init(void);
66
74uint8_t ds3231_output_deinit(void);
75
85
95
104uint8_t ds3231_output_set_timestamp(time_t timestamp);
105
113uint8_t ds3231_output_set_timestamp_time_zone(int8_t zone);
114
123uint8_t ds3231_output_get_timestamp(time_t *timestamp);
124
132uint8_t ds3231_output_get_timestamp_time_zone(int8_t *zone);
133
143uint8_t ds3231_output_get_temperature(int16_t *raw, float *s);
144
154uint8_t ds3231_output_get_ascii_time(char *buf, uint8_t len);
155
165
175
185
195
199
200#ifdef __cplusplus
201}
202#endif
203
204#endif
driver ds3231 interface header file
struct ds3231_time_s ds3231_time_t
ds3231 time structure definition
ds3231_bool_t
ds3231 bool enumeration definition
uint8_t ds3231_output_set_timestamp(time_t timestamp)
output example set the time by a unix timestamp
uint8_t ds3231_output_set_square_wave(ds3231_bool_t enable)
output example enable or disable the square wave
uint8_t ds3231_output_set_32khz_output(ds3231_bool_t enable)
output example enable or disable the 32KHz output
uint8_t ds3231_output_get_timestamp_time_zone(int8_t *zone)
output example get the local time zone
uint8_t ds3231_output_set_time(ds3231_time_t *t)
output example set the time
uint8_t ds3231_output_get_32khz_output(ds3231_bool_t *enable)
output example get the 32KHz output status
uint8_t ds3231_output_get_temperature(int16_t *raw, float *s)
output example get the current temperature
uint8_t ds3231_output_set_timestamp_time_zone(int8_t zone)
output example set the local time zone
uint8_t ds3231_output_get_timestamp(time_t *timestamp)
output example get the time in a unix timestamp
uint8_t ds3231_output_init(void)
output example init
uint8_t ds3231_output_get_ascii_time(char *buf, uint8_t len)
output example get the ascii time
uint8_t ds3231_output_get_time(ds3231_time_t *t)
output example get the time
uint8_t ds3231_output_get_square_wave(ds3231_bool_t *enable)
output example get the square wave status
uint8_t ds3231_output_deinit(void)
output example deinit