rtc6 2.0.0.0
|
This file contains API for RTC6 Click driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"
Go to the source code of this file.
Data Structures | |
struct | rtc6_time_t |
Click time data object. More... | |
struct | rtc6_t |
Click ctx object definition. More... | |
struct | rtc6_cfg_t |
Click configuration structure definition. More... | |
Functions | |
void | rtc6_cfg_setup (rtc6_cfg_t *cfg) |
Config Object Initialization function. | |
RTC6_RETVAL | rtc6_init (rtc6_t *ctx, rtc6_cfg_t *cfg) |
Initialization function. | |
void | rtc6_default_cfg (rtc6_t *ctx, int8_t time_zone, rtc6_time_t *utc_time, rtc6_time_t *alarm_time) |
Click Default Configuration function. | |
void | rtc6_generic_write (rtc6_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | rtc6_generic_read (rtc6_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
uint8_t | rtc6_init_fun (rtc6_t *ctx, int8_t time_zone) |
void | rtc6_enable_swo (rtc6_t *ctx, uint8_t swo) |
Enable Square Wave Output. | |
void | rtc6_disable_swo (rtc6_t *ctx) |
Disables Square Wave Output. | |
void | rtc6_battery_enable (rtc6_t *ctx) |
Enables automatic switch to battery. | |
void | rtc6_get_gmt_time (rtc6_t *ctx, rtc6_time_t *gmt_time) |
Gets the current GMT time set in the RTC. | |
void | rtc6_set_gmt_time (rtc6_t *ctx, rtc6_time_t *set_time) |
Sets the UTC GMT time. | |
void | rtc6_get_local_time (rtc6_t *ctx, rtc6_time_t *local_time) |
Calculates the current local time. | |
uint32_t | rtc6_get_gmt_unix_time (rtc6_t *ctx) |
Calculates the current GMT time in UNIX epoch time. | |
uint32_t | rtc6_get_local_unix_time (rtc6_t *ctx) |
Calculates the current local time in UNIX epoch time. | |
uint8_t | rtc6_is_leap_year (rtc6_t *ctx) |
Checks if the current year is a leap one. | |
uint8_t | rtc6_is_power_failure (rtc6_t *ctx) |
Checks if a power failure has occured. | |
void | rtc6_get_last_power_failure (rtc6_t *ctx, rtc6_time_t *last_time) |
Gets the time of the last power failure. | |
void | rtc6_set_alarm (rtc6_t *ctx, uint8_t alarm, uint8_t trigger, rtc6_time_t *time) |
Sets the desired alarm. | |
void | rtc6_disable_alarm (rtc6_t *ctx, uint8_t alarm) |
Disables the alarm. | |
void | rtc6_read_alarm (rtc6_t *ctx, uint8_t alarm, rtc6_time_t *get_alarm) |
Reads the alarm time. | |
uint8_t | rtc6_is_active_alarm (rtc6_t *ctx) |
Check if the alarm is activated. | |
void | rtc6_repeat_alarm (rtc6_t *ctx, uint8_t alarm, uint32_t sec) |
Repeat Alarm. | |
void | rtc6_write_sram (rtc6_t *ctx, uint8_t addr, uint8_t data_in) |
Writes data to the SRAM. | |
uint8_t | rtc6_read_sram (rtc6_t *ctx, uint8_t addr) |
Reads data from an SRAM. | |
void | rtc6_write_eeprom_protect_on (rtc6_t *ctx) |
Write protect on. | |
void | rtc6_write_eeprom_protect_off (rtc6_t *ctx) |
Write protect off. | |
uint8_t | rtc6_eeprom_is_locked (rtc6_t *ctx) |
Lock check function. | |
void | rtc6_write_eeprom (rtc6_t *ctx, uint8_t addr, uint8_t *data_in, uint8_t data_size) |
Writes data to EEPROM. | |
void | rtc6_read_eeprom (rtc6_t *ctx, uint8_t addr, uint8_t *data_out, uint8_t data_size) |
Reads data from EEPROM. | |
void | rtc6_read_unique_id (rtc6_t *ctx, uint8_t *unique_id) |
Reads unique ID. | |
This file contains API for RTC6 Click driver.