rtc
2.0.0.0
|
This file contains API for RTC 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 | rtc_date_t |
Date data structure. More... | |
struct | rtc_time_t |
Time data structure. More... | |
struct | rtc_t |
Click ctx object definition. More... | |
struct | rtc_cfg_t |
Click configuration structure definition. More... | |
Macros | |
#define | RTC_MAP_MIKROBUS(cfg, mikrobus) |
#define | RTC_OK 0 |
#define | RTC_ERROR -1 |
#define | RTC_I2C_ADDRESS_0 0x50 |
#define | RTC_I2C_ADDRESS_1 0x51 |
#define | RTC_REG_CONTROL 0x00 |
#define | RTC_REG_TIME_HUN_SEC 0x01 |
#define | RTC_REG_TIME_SEC 0x02 |
#define | RTC_REG_TIME_MIN 0x03 |
#define | RTC_REG_TIME_HOUR 0x04 |
#define | RTC_REG_TIME_DATE_DAY_AND_YEAR 0x05 |
#define | RTC_REG_TIME_DAY_OF_THE_WEEK_AND_MONTH 0x06 |
#define | RTC_REG_TIMER 0x07 |
#define | RTC_REG_TIME_ALARM_CONTROL 0x08 |
#define | RTC_REG_TIME_ALARM_HUN_SEC 0x09 |
#define | RTC_REG_TIME_ALARM_SEC 0x0A |
#define | RTC_REG_TIME_ALARM_MIN 0x0B |
#define | RTC_REG_TIME_ALARM_HOUR 0x0C |
#define | RTC_REG_TIME_ALARM_DATE_DAY_AND_YEAR 0x0D |
#define | RTC_REG_TIME_ALARM_DAY_OF_THE_WEEK_AND_MONTH 0x0E |
#define | RTC_REG_TIME_ALARM_TIMER 0x0F |
Functions | |
void | rtc_cfg_setup (rtc_cfg_t *cfg) |
Config Object Initialization function. More... | |
err_t | rtc_init (rtc_t *ctx, rtc_cfg_t *cfg) |
Initialization function. More... | |
err_t | rtc_generic_write (rtc_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
RTC I2C writing function. More... | |
err_t | rtc_generic_read (rtc_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
RTC I2C reading function. More... | |
void | rtc_enable_disable_counting (rtc_t *ctx, uint8_t en_dis) |
Enable/Disable counting function. More... | |
void | rtc_read_time (rtc_t *ctx) |
Set control register to read time function. More... | |
void | rtc_read_date (rtc_t *ctx) |
Set control register to read date function. More... | |
uint8_t | rtc_get_time_value (rtc_t *ctx, uint8_t time_part) |
Get time value function. More... | |
void | rtc_set_time_value (rtc_t *ctx, uint8_t time_part, uint8_t time_addr) |
Set time values function. More... | |
uint8_t | rtc_get_date_day (rtc_t *ctx) |
Get day function. More... | |
void | rtc_set_date_day (rtc_t *ctx, uint8_t date_day) |
Set day function. More... | |
uint8_t | rtc_get_date_year (rtc_t *ctx) |
Get year function. More... | |
void | rtc_set_date_year (rtc_t *ctx, uint16_t date_year) |
Set year function. More... | |
uint8_t | rtc_check_leap_year (rtc_t *ctx) |
Check if it's a leap year function. More... | |
uint8_t | rtc_get_day_of_the_week (rtc_t *ctx) |
Get day of the week function. More... | |
void | rtc_set_day_of_the_week (rtc_t *ctx, uint8_t w_day) |
Set day of the week function. More... | |
uint8_t | rtc_get_date_month (rtc_t *ctx) |
Get month function. More... | |
void | rtc_set_date_month (rtc_t *ctx, uint8_t date_month) |
Set month function. More... | |
void | rtc_set_time (rtc_t *ctx) |
Set time hours, minutes, seconds and hundredth of a seconds function. More... | |
void | rtc_get_time (rtc_t *ctx) |
Get time hours, minutes, seconds and hundredth of a seconds function. More... | |
void | rtc_set_date (rtc_t *ctx) |
Set date hours, minutes and seconds function. More... | |
void | rtc_get_date (rtc_t *ctx) |
Get time hours, minutes and seconds function. More... | |
void | rtc_enable_disable_alarm (rtc_t *ctx, uint8_t en_dis) |
Enable/Disable alarm function. More... | |
void | rtc_set_alarm_value (rtc_t *ctx, uint8_t al_time_val, uint8_t al_time_type) |
Set alarm time value. More... | |
uint8_t | rtc_get_alarm_value (rtc_t *ctx, uint8_t alarm_addr) |
Get alarm time value function. More... | |
void | rtc_set_time_alarm (rtc_t *ctx) |
Set alarm time - minutes function. More... | |
void | rtc_get_time_alarm (rtc_t *ctx) |
Get the alarm time hours, minutes, seconds and hundredth of a seconds function. More... | |
void | rtc_enable_disable_interrupt (rtc_t *ctx, uint8_t flag) |
Enable alarm interrupt function. More... | |
uint8_t | rtc_get_interrupt (rtc_t *ctx) |
Get state of interrupt pin function. More... | |
This file contains API for RTC Click driver.