rtc3
2.0.0.0
|
Functions | |
void | rtc3_cfg_setup (rtc3_cfg_t *cfg) |
Config Object Initialization function. More... | |
RTC3_RETVAL | rtc3_init (rtc3_t *ctx, rtc3_cfg_t *cfg) |
Initialization function. More... | |
void | rtc3_default_cfg (rtc3_t *ctx) |
Click Default Configuration function. More... | |
void | rtc3_generic_write (rtc3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. More... | |
void | rtc3_generic_read (rtc3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. More... | |
void | rtc3_enable_disable_counting (rtc3_t *ctx, uint8_t en_dis) |
Enable/Disable counting function. More... | |
uint8_t | rtc3_get_time_value (rtc3_t *ctx, uint8_t time_part) |
Get time value function. More... | |
void | rtc3_set_time_value (rtc3_t *ctx, uint8_t time_part, uint8_t time_addr) |
Set time values function. More... | |
uint8_t | rtc3_get_date_day (rtc3_t *ctx) |
Get day function. More... | |
void | rtc3_set_date_day (rtc3_t *ctx, uint8_t date_day) |
Set day function. More... | |
uint8_t | rtc3_get_date_month (rtc3_t *ctx) |
Get month function. More... | |
void | rtc3_set_date_month (rtc3_t *ctx, uint8_t date_month) |
Set month function. More... | |
uint8_t | rtc3_get_date_year (rtc3_t *ctx) |
Get year function. More... | |
void | rtc3_set_date_year (rtc3_t *ctx, uint16_t date_year) |
Set year function. More... | |
uint8_t | rtc3_get_day_of_the_week (rtc3_t *ctx) |
Get day of the week function. More... | |
void | rtc3_set_day_of_the_week (rtc3_t *ctx, uint8_t w_day) |
Set day of the week function. More... | |
void | rtc3_set_time (rtc3_t *ctx) |
Set time hours, minutes, seconds and hundredth of a seconds function. More... | |
void | rtc3_get_time (rtc3_t *ctx) |
Get time hours, minutes, seconds and hundredth of a seconds function. More... | |
void | rtc3_set_date (rtc3_t *ctx) |
Set date hours, minutes and seconds function. More... | |
void | rtc3_get_date (rtc3_t *ctx) |
Get time hours, minutes and seconds function. More... | |
void | rtc3_set_calibration (rtc3_t *ctx, uint8_t cal_sign, uint8_t cal_mumber) |
Set calibration function. More... | |
void | rtc3_set_trickle_charge (rtc3_t *ctx, uint8_t tch2) |
Set trickle charge control function. More... | |
void | rtc3_set_trickle_charge_bypass (rtc3_t *ctx, uint8_t tcfe) |
Set trickle charge bypass control function. More... | |
void | rtc3_set_special_function_key1 (rtc3_t *ctx, uint8_t sfkey1) |
Set special function key byte 1 function. More... | |
void | rtc3_set_special_function_key2 (rtc3_t *ctx, uint8_t sfkey2) |
Set special function key byte 2 function. More... | |
void | rtc3_set_frequency_calibration (rtc3_t *ctx, uint8_t ftf) |
Set frequency calibration control function. More... | |
uint8_t | rtc3_get_interrupt (rtc3_t *ctx) |
Get state of interrupt pin function. More... | |
void rtc3_cfg_setup | ( | rtc3_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void rtc3_default_cfg | ( | rtc3_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Rtc 3 click.
void rtc3_enable_disable_counting | ( | rtc3_t * | ctx, |
uint8_t | en_dis | ||
) |
Enable/Disable counting function.
ctx | Click object. |
@description Function enables or disables counting on RTC 3 Click.
void rtc3_generic_read | ( | rtc3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len | ||
) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function reads data from the desired register.
void rtc3_generic_write | ( | rtc3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len | ||
) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function writes data to the desired register.
void rtc3_get_date | ( | rtc3_t * | ctx | ) |
Get time hours, minutes and seconds function.
ctx | Click object. |
@description Function gets date: day of the week, day, month and year data from the target register address of PCF8583 chip on RTC 3 Click.
uint8_t rtc3_get_date_day | ( | rtc3_t * | ctx | ) |
Get day function.
ctx | Click object. |
Date | day [ 1 - 31 ] |
@description Function gets day data from the target register address of PCF8583 chip on RTC 3 Click.
uint8_t rtc3_get_date_month | ( | rtc3_t * | ctx | ) |
Get month function.
ctx | Click object. |
Month | [ 1 - 12 ] |
@description Function gets month data from the target register address of PCF8583 chip on RTC 3 Click.
uint8_t rtc3_get_date_year | ( | rtc3_t * | ctx | ) |
Get year function.
ctx | Click object. |
Year | [ 00 - 99 ] |
@description Function gets year data from the target register address of PCF8583 chip on RTC 3 Click.
uint8_t rtc3_get_day_of_the_week | ( | rtc3_t * | ctx | ) |
Get day of the week function.
ctx | Click object. |
Day | of the week [ 1 - 7 ] |
@description Function gets day of the week data from tne target register address of PCF8583 chip on RTC Click.
uint8_t rtc3_get_interrupt | ( | rtc3_t * | ctx | ) |
Get state of interrupt pin function.
ctx | Click object. |
state | of INT pin
|
@description Function get state of interrupt ( INT ) pin.
void rtc3_get_time | ( | rtc3_t * | ctx | ) |
Get time hours, minutes, seconds and hundredth of a seconds function.
ctx | Click object. |
@description Function gets time: hours, minutes and seconds data from the target register address of PCF8583 chip on RTC 3 Click.
uint8_t rtc3_get_time_value | ( | rtc3_t * | ctx, |
uint8_t | time_part | ||
) |
Get time value function.
ctx | Click object. |
time_part | Time part register address. |
Part | of the current time in hours [ 0 h - 23 h ], minutes [ 0 min - 59 min ], or seconds [ 0 sec - 59 sec ]. |
@description Function gets hundredths of a second, seconds, minutes or hours data from the target register address of PCF8583 chip on RTC 3 Click.
RTC3_RETVAL rtc3_init | ( | rtc3_t * | ctx, |
rtc3_cfg_t * | cfg | ||
) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void rtc3_set_calibration | ( | rtc3_t * | ctx, |
uint8_t | cal_sign, | ||
uint8_t | cal_mumber | ||
) |
Set calibration function.
ctx | Click object. |
calSign | Calibration sign: <pre> - 0: POSITIV; - 1: NEGATIV; </pre> |
calNumber | Calibration number:
|
void rtc3_set_date | ( | rtc3_t * | ctx | ) |
Set date hours, minutes and seconds function.
ctx | Click object. |
@description Function sets date: day of the week, day, month and year data to the target register address of PCF8583 chip on RTC 3 Click.
void rtc3_set_date_day | ( | rtc3_t * | ctx, |
uint8_t | date_day | ||
) |
Set day function.
ctx | Click object. |
date_day | Date day data [ 1 - 31 ] |
@description Function sets day data from the target register address of PCF8583 chip on RTC 3 Click.
void rtc3_set_date_month | ( | rtc3_t * | ctx, |
uint8_t | date_month | ||
) |
Set month function.
ctx | Click object. |
date_month | Date month data [ 1 - 12 ] |
@description Function sets month data from the target register address of PCF8583 chip on RTC 3 Click.
void rtc3_set_date_year | ( | rtc3_t * | ctx, |
uint16_t | date_year | ||
) |
Set year function.
ctx | Click object. |
date_year | Date year data [ 00 - 99 ] |
@description Function sets year data from the target register address of PCF8583 chip on RTC 3 Click.
void rtc3_set_day_of_the_week | ( | rtc3_t * | ctx, |
uint8_t | w_day | ||
) |
Set day of the week function.
ctx | Click object. |
w_day | Day of the week data [ 1 - 7 ]
|
@description Function sets day of the week data to the target register address of PCF8583 chip on RTC Click.
void rtc3_set_frequency_calibration | ( | rtc3_t * | ctx, |
uint8_t | ftf | ||
) |
Set frequency calibration control function.
ctx | Click object. |
ftf | frequency of the calibration output
|
@description Function set force calibration control. FTF allows the frequency of the calibration output to be changed from 512 Hz to 1 Hz. By default, FTF is cleared, and the RTC outputs a 512-Hz calibration signal. Setting FTF forces the calibration signal to 1 Hz, and the calibration tracks the internal ppm adjustment.
void rtc3_set_special_function_key1 | ( | rtc3_t * | ctx, |
uint8_t | sfkey1 | ||
) |
Set special function key byte 1 function.
ctx | Click object. |
sfkey1 | special function key byte 1 |
@description Function set special function access key byte 1. Reads as 0x00, and key is 0x5E. The SF KEY 1 registers are used to enable access to the main special function register (SFR). Access to SFR is granted only after the special function keys are written sequentially to SF KEY 1. Each write to the SFR must be preceded by writing the SF keys to the SF key registers, in order, SF KEY 1 then SF KEY 2.
void rtc3_set_special_function_key2 | ( | rtc3_t * | ctx, |
uint8_t | sfkey2 | ||
) |
Set special function key byte 2 function.
ctx | Click object. |
sfkey2 | special function key byte 2 |
@description Function set special function access key byte 2. Reads as 0x00, and key is 0x5E. The SF KEY 2 registers are used to enable access to the main special function register (SFR). Access to SFR is granted only after the special function keys are written sequentially to SF KEY 2. Each write to the SFR must be preceded by writing the SF keys to the SF key registers, in order, SF KEY 1 then SF KEY 2.
void rtc3_set_time | ( | rtc3_t * | ctx | ) |
Set time hours, minutes, seconds and hundredth of a seconds function.
ctx | Click object. |
@description Function sets time: hours, minutes and seconds data to the target register address of PCF8583 chip on RTC 3 Click.
void rtc3_set_time_value | ( | rtc3_t * | ctx, |
uint8_t | time_part, | ||
uint8_t | time_addr | ||
) |
Set time values function.
ctx | Click object. |
time_part | Part of time format ( hours, minutes or seconds ). |
time_addr | Register address of the corresponding part of the time format. |
@description Function sets seconds data to the target register address of PCF8583 chip on RTC 3 Click.
void rtc3_set_trickle_charge | ( | rtc3_t * | ctx, |
uint8_t | tch2 | ||
) |
Set trickle charge control function.
ctx | Click object. |
tch2 | trickle charge control
|
@description Function set the TCH2 bit determines if the internal trickle charge switch is closed or open. All the trickle charge switches must be closed in order for trickle charging to occur.
void rtc3_set_trickle_charge_bypass | ( | rtc3_t * | ctx, |
uint8_t | tcfe | ||
) |
Set trickle charge bypass control function.
ctx | Click object. |
tcfe | trickle charge control
|
@description Function set the trickle charge FET bypass. The TCFE bit is used to enable the trickle charge FET. When TCFE is 0, the FET is off.