rtc5 2.0.0.0
|
Functions | |
void | rtc5_cfg_setup (rtc5_cfg_t *cfg) |
Config Object Initialization function. | |
RTC5_RETVAL | rtc5_init (rtc5_t *ctx, rtc5_cfg_t *cfg) |
Initialization function. | |
void | rtc5_default_cfg (rtc5_t *ctx) |
Click Default Configuration function. | |
void | rtc5_generic_transfer (rtc5_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len) |
Generic transfer function. | |
void | rtc5_generic_write (rtc5_t *ctx, uint8_t reg, uint8_t tx_data) |
Click Default Configuration function. | |
uint8_t | rtc5_generic_read (rtc5_t *ctx, uint8_t reg) |
Click Default Configuration function. | |
void | rtc5_set_counting (rtc5_t *ctx, uint8_t en_osc) |
Enable counting function. | |
void | rtc5_clear (rtc5_t *ctx) |
Clear RTCC and SRAM memory function. | |
void | rtc5_set_time_hun_of_sec (rtc5_t *ctx, uint8_t hun_sec) |
Set hundred of seconds function. | |
uint8_t | rtc5_get_time_hun_of_sec (rtc5_t *ctx) |
Get hundred of seconds function. | |
void | rtc5_set_time_sec (rtc5_t *ctx, uint8_t seconds) |
Set seconds function. | |
uint8_t | rtc5_get_time_sec (rtc5_t *ctx) |
Get seconds function. | |
void | rtc5_set_time_min (rtc5_t *ctx, uint8_t minutes) |
Set minutes function. | |
uint8_t | rtc5_get_time_min (rtc5_t *ctx) |
Get minutes function. | |
void | rtc5_set_time_hours (rtc5_t *ctx, uint8_t hours) |
Set hours function. | |
uint8_t | rtc5_get_time_hours (rtc5_t *ctx) |
Get hours function. | |
void | rtc5_set_day_of_the_week (rtc5_t *ctx, uint8_t w_day) |
Set day of the week function. | |
uint8_t | rtc5_get_day_of_the_week (rtc5_t *ctx) |
Get day of the week function. | |
void | rtc5_set_date_day (rtc5_t *ctx, uint8_t date_day) |
Set day function. | |
uint8_t | rtc5_get_date_day (rtc5_t *ctx) |
Get day function. | |
void | rtc5_set_date_month (rtc5_t *ctx, uint8_t date_month) |
Set month function. | |
uint8_t | rtc5_get_date_month (rtc5_t *ctx) |
Get month function. | |
uint8_t | rtc5_get_leap_year (rtc5_t *ctx) |
Get leap year function. | |
void | rtc5_set_date_year (rtc5_t *ctx, uint16_t date_year) |
Set year function. | |
uint8_t | rtc5_get_date_year (rtc5_t *ctx) |
Get year function. | |
void | rtc5_set_time (rtc5_t *ctx, uint8_t time_hours, uint8_t time_min, uint8_t time_sec) |
Set time hours, minutes and seconds function. | |
void | rtc5_set_date (rtc5_t *ctx, uint8_t date_day, uint8_t date_month, uint16_t date_year) |
Set date hours, minutes and seconds function. | |
void | rtc5_get_time_and_date (rtc5_t *ctx, rtc5_timedate_t *timedate_data) |
Get time and date function. | |
void rtc5_cfg_setup | ( | rtc5_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void rtc5_clear | ( | rtc5_t * | ctx | ) |
Clear RTCC and SRAM memory function.
ctx | Click object. |
@description This function executes clear RTCC and SRAM memory of MCP79510 chip on RTC 5 Click.
void rtc5_default_cfg | ( | rtc5_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for RTC5 click.
Time : 00:00:00
Date : 01.01.2000.
Day of the week : Saturday
uint8_t rtc5_generic_read | ( | rtc5_t * | ctx, |
uint8_t | reg ) |
Click Default Configuration function.
ctx | Click object. |
reg | Register address. |
@description This function executes read the 8-bit of data from the target 8-bit register address of MCP79510 chip on RTC 5 Click.
void rtc5_generic_transfer | ( | rtc5_t * | ctx, |
uint8_t * | wr_buf, | ||
uint16_t | wr_len, | ||
uint8_t * | rd_buf, | ||
uint16_t | rd_len ) |
Generic transfer function.
ctx | Click object. |
wr_buf | Write data buffer |
wr_len | Number of byte in write data buffer |
rd_buf | Read data buffer |
rd_len | Number of byte in read data buffer |
@description Generic SPI transfer, for sending and receiving packages
void rtc5_generic_write | ( | rtc5_t * | ctx, |
uint8_t | reg, | ||
uint8_t | tx_data ) |
Click Default Configuration function.
ctx | Click object. |
reg | Register address. |
tx_data | Data to be written. |
@description This function executes write the 8-bit of data to the target 8-bit register address of MCP79510 chip on RTC 5 Click.
uint8_t rtc5_get_date_day | ( | rtc5_t * | ctx | ) |
Get day function.
ctx | Click object. |
@description This function gets day data from the target register address ( 0x05 ) of MCP79510 chip on RTC 5 Click.
uint8_t rtc5_get_date_month | ( | rtc5_t * | ctx | ) |
Get month function.
ctx | Click object. |
@description This function gets month data from the target register address ( 0x06 ) of MCP79510 chip on RTC 5 Click.
uint8_t rtc5_get_date_year | ( | rtc5_t * | ctx | ) |
Get year function.
ctx | Click object. |
@description This function gets year data from the target register address ( 0x07 ) of MCP79510 chip on RTC 5 Click.
uint8_t rtc5_get_day_of_the_week | ( | rtc5_t * | ctx | ) |
Get day of the week function.
ctx | Click object. |
@description This function gets day of the week data from the target register address ( 0x04 ) of MCP79510 chip on RTC 5 Click.
uint8_t rtc5_get_leap_year | ( | rtc5_t * | ctx | ) |
Get leap year function.
ctx | Click object. |
@description This function gets leap year data from the target register address ( 0x06 ) of MCP79510 chip on RTC 5 Click.
void rtc5_get_time_and_date | ( | rtc5_t * | ctx, |
rtc5_timedate_t * | timedate_data ) |
Get time and date function.
ctx | Click object. |
timedate_data | pointer to the memory location where time and date data be stored. |
This function gets time ( hours, minutes and seconds ) and date ( day, month and year ) of MCP79510 chip on RTC 5 Click.
uint8_t rtc5_get_time_hours | ( | rtc5_t * | ctx | ) |
Get hours function.
ctx | Click object. |
@description This function gets hours data from the target register address ( 0x03 ) of MCP79510 chip on RTC 5 Click.
uint8_t rtc5_get_time_hun_of_sec | ( | rtc5_t * | ctx | ) |
Get hundred of seconds function.
ctx | Click object. |
@description This function gets hundred of second data from the target register address ( 0x00 ) of MCP79510 chip on RTC 5 Click.
uint8_t rtc5_get_time_min | ( | rtc5_t * | ctx | ) |
Get minutes function.
ctx | Click object. |
@description This function gets minutes data from the target register address ( 0x02 ) of MCP79510 chip on RTC 5 Click.
uint8_t rtc5_get_time_sec | ( | rtc5_t * | ctx | ) |
Get seconds function.
ctx | Click object. |
@description This function gets seconds data from the target register address ( 0x01 ) of MCP79510 chip on RTC 5 Click.
RTC5_RETVAL rtc5_init | ( | rtc5_t * | ctx, |
rtc5_cfg_t * | cfg ) |
Initialization function.
rtc5 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void rtc5_set_counting | ( | rtc5_t * | ctx, |
uint8_t | en_osc ) |
Enable counting function.
ctx | Click object. |
en_osc | Enable oscilator. |
@description This function executes enable or disable counting on RTC 5 Click.
void rtc5_set_date | ( | rtc5_t * | ctx, |
uint8_t | date_day, | ||
uint8_t | date_month, | ||
uint16_t | date_year ) |
Set date hours, minutes and seconds function.
ctx | Click object. |
date_day | Date day data [ 1 : 31 ] |
date_month | Date month data [ 1 : 12 ] |
date_year | Date year data [ 0 : 99 ] |
This function sets date: day, month and year data to the target register address ( 0x04, 0x05, 0x06 & 0x07 ) of MCP79510 chip on RTC 5 Click.
void rtc5_set_date_day | ( | rtc5_t * | ctx, |
uint8_t | date_day ) |
Set day function.
ctx | Click object. |
date_day | Date day data [ 1 : 31 ] |
@description This function sets day data from the target register address ( 0x05 ) of MCP79510 chip on RTC 5 Click.
void rtc5_set_date_month | ( | rtc5_t * | ctx, |
uint8_t | date_month ) |
Set month function.
ctx | Click object. |
date_month | Date month data [ 1 : 31 ] |
@description This function sets month data from the target register address ( 0x06 ) of MCP79510 chip on RTC 5 Click.
void rtc5_set_date_year | ( | rtc5_t * | ctx, |
uint16_t | date_year ) |
Set year function.
ctx | Click object. |
date_year | Date year data [ 00 : 99 ] |
@description This function sets year data from the target register address ( 0x07 ) of MCP79510 chip on RTC 5 Click.
void rtc5_set_day_of_the_week | ( | rtc5_t * | ctx, |
uint8_t | w_day ) |
Set day of the week function.
ctx | Click object. |
wDay | Day of the week data [ 1 : 7 ]
|
@description This function sets day of the week data to the target register address ( 0x04 ) of MCP79510 chip on RTC 5 Click.
void rtc5_set_time | ( | rtc5_t * | ctx, |
uint8_t | time_hours, | ||
uint8_t | time_min, | ||
uint8_t | time_sec ) |
Set time hours, minutes and seconds function.
ctx | Click object. |
time_hours | Time hours [ 0 h : 23 h ] |
time_min | Time minutes [ 0 min : 59 min ] |
time_sec | Time seconds [ 0 sec : 59 sec ] |
This function sets time: hours, minutes and seconds data to the target register address ( 0x01, 0x02 & 0x03 ) of MCP79510 chip on RTC 5 Click.
void rtc5_set_time_hours | ( | rtc5_t * | ctx, |
uint8_t | hours ) |
Set hours function.
ctx | Click object. |
hours | Time hours [ 0 h : 23 h ] |
@description This function sets hours value to the target register address ( 0x03 ) of MCP79510 chip on RTC 5 Click.
void rtc5_set_time_hun_of_sec | ( | rtc5_t * | ctx, |
uint8_t | hun_sec ) |
Set hundred of seconds function.
ctx | Click object. |
hun_sec | Time: hundred of seconds [ 0 hs : 99 hs ]. |
@description This function sets hundred of seconds value to the target register address ( 0x00 ) of MCP79510 chip on RTC 5 Click.
void rtc5_set_time_min | ( | rtc5_t * | ctx, |
uint8_t | minutes ) |
Set minutes function.
ctx | Click object. |
minutes | Time minutes [ 0 min : 59 min ] |
@description This function sets minutes value to the target register address ( 0x02 ) of MCP79510 chip on RTC 5 Click.
void rtc5_set_time_sec | ( | rtc5_t * | ctx, |
uint8_t | seconds ) |
Set seconds function.
ctx | Click object. |
seconds | Time seconds [ 0 sec : 59 sec ] |
@description This function sets seconds value to the target register address ( 0x01 ) of MCP79510 chip on RTC 5 Click.