rtc10 2.0.0.0
|
Functions | |
void | rtc10_cfg_setup (rtc10_cfg_t *cfg) |
Config Object Initialization function. | |
RTC10_RETVAL | rtc10_init (rtc10_t *ctx, rtc10_cfg_t *cfg) |
Initialization function. | |
void | rtc10_default_cfg (rtc10_t *ctx) |
Click Default Configuration function. | |
void | rtc10_generic_write (rtc10_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | rtc10_generic_read (rtc10_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | rtc10_hw_reset (rtc10_t *ctx) |
Hardware reset function. | |
uint8_t | rtc10_check_interrupt (rtc10_t *ctx) |
Check the state of interrupt function. | |
uint8_t | rtc10_read_byte (rtc10_t *ctx, uint8_t reg_address) |
Generic read function. | |
void | rtc10_write_byte (rtc10_t *ctx, uint8_t reg_address, uint8_t write_data) |
Generic read function. | |
uint8_t | rtc10_get_time_seconds (rtc10_t *ctx) |
Get seconds function. | |
void | rtc10_set_time_seconds (rtc10_t *ctx, uint8_t seconds) |
Generic read function. | |
uint8_t | rtc10_get_time_minutes (rtc10_t *ctx) |
Get seconds function. | |
void | rtc10_set_time_minutes (rtc10_t *ctx, uint8_t minutes) |
Generic read function. | |
uint8_t | rtc10_get_century_flag (rtc10_t *ctx) |
Get century flag function. | |
void | rtc10_set_century_flag (rtc10_t *ctx) |
Set century flag function. | |
uint8_t | rtc10_get_time_hours (rtc10_t *ctx) |
Get hours function. | |
void | rtc10_set_time_hours (rtc10_t *ctx, uint8_t hours) |
Set hours function. | |
uint8_t | rtc10_get_day_of_the_week (rtc10_t *ctx) |
Get day of the week function. | |
void | rtc10_set_day_of_the_week (rtc10_t *ctx, uint8_t w_day) |
Set day of the week function. | |
uint8_t | rtc10_get_date_day (rtc10_t *ctx) |
Get date function. | |
void | rtc10_set_date_day (rtc10_t *ctx, uint8_t date_day) |
Set date function. | |
uint8_t | rtc10_get_date_month (rtc10_t *ctx) |
Get month function. | |
void | rtc10_set_date_month (rtc10_t *ctx, uint8_t date_month) |
Set month function. | |
uint8_t | rtc10_get_date_year (rtc10_t *ctx) |
Get year function. | |
void | rtc10_set_date_year (rtc10_t *ctx, uint16_t date_year) |
Set month function. | |
void | rtc10_set_time (rtc10_t *ctx, uint8_t time_hours, uint8_t time_minutes, uint8_t time_seconds) |
Set time: hours, minutes and seconds function. | |
void | rtc10_get_time (rtc10_t *ctx, uint8_t *time_hours, uint8_t *time_minutes, uint8_t *time_seconds) |
Get time hours, minutes and seconds function. | |
void | rtc10_set_date (rtc10_t *ctx, uint8_t day_of_the_week, uint8_t date_day, uint8_t date_month, uint16_t date_year) |
Set date hours, minutes and seconds function. | |
void | rtc10_get_date (rtc10_t *ctx, uint8_t *day_of_the_week, uint8_t *date_day, uint8_t *date_month, uint8_t *date_year) |
Get time hours, minutes and seconds function. | |
uint8_t | rtc10_get_alarm_time_seconds (rtc10_t *ctx) |
Get alarm time seconds function. | |
void | rtc10_set_alarm_time_seconds (rtc10_t *ctx, uint8_t seconds) |
Set alarm time seconds function. | |
uint8_t | rtc10_get_alarm_time_minutes (rtc10_t *ctx) |
Get alarm time minutes function. | |
void | rtc10_set_alarm_time_minutes (rtc10_t *ctx, uint8_t minutes) |
Set alarm time seconds function. | |
uint8_t | rtc10_get_alarm_time_hours (rtc10_t *ctx) |
Get alarm time hours function. | |
void | rtc10_set_alarm_time_hours (rtc10_t *ctx, uint8_t hours) |
Set alarm time seconds function. | |
uint8_t | rtc10_get_alarm_date_day (rtc10_t *ctx) |
Get alarm days function. | |
void | rtc10_set_alarm_date_day (rtc10_t *ctx, uint8_t date_day) |
Set alarm days function. | |
void | rtc10_set_first_alarm (rtc10_t *ctx, uint8_t time_days, uint8_t time_hours, uint8_t time_minutes, uint8_t time_seconds) |
Set Alarm 1 time: hours, minutes and seconds function. | |
void | rtc10_get_first_alarm (rtc10_t *ctx, uint8_t *time_days, uint8_t *time_hours, uint8_t *time_minutes, uint8_t *time_seconds) |
Get Alarm 1 time hours, minutes and seconds function. | |
void | rtc10_set_second_alarm (rtc10_t *ctx, uint8_t time_days, uint8_t time_hours, uint8_t time_minutes) |
Set Alarm 2 time: hours, minutes and seconds function. | |
void | rtc10_get_second_alarm (rtc10_t *ctx, uint8_t *time_days, uint8_t *time_hours, uint8_t *time_minutes) |
Set Alarm 2 time: hours, minutes and seconds function. | |
void | rtc10_enable_counting (rtc10_t *ctx) |
Enable counting function. | |
void | rtc10_set_config (rtc10_t *ctx, uint8_t config_data) |
Set configuration function. | |
uint8_t | rtc10_get_status (rtc10_t *ctx) |
Get configuration status function. | |
float | rtc10_get_temperature (rtc10_t *ctx) |
Get temperature function. | |
void rtc10_cfg_setup | ( | rtc10_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t rtc10_check_interrupt | ( | rtc10_t * | ctx | ) |
Check the state of interrupt function.
ctx | Click object. |
@description Function check the state of interrupt ( INT ) pin of RTC 10 Click.
void rtc10_default_cfg | ( | rtc10_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Rtc10 click.
void rtc10_enable_counting | ( | rtc10_t * | ctx | ) |
Enable counting function.
ctx | Click object. |
@description This function enable counting on RTC 10 Click by set bit 7 of the targets ( _RTC10_CONTROL ) registers address of DS3231M I2C realtime clock.
void rtc10_generic_read | ( | rtc10_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 rtc10_generic_write | ( | rtc10_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.
uint8_t rtc10_get_alarm_date_day | ( | rtc10_t * | ctx | ) |
Get alarm days function.
ctx | Click object. |
@description This function gets alarm days data from the target ( _RTC10_ALM1DATE or _RTC10_ALM2DATE ) register address of DS3231M I2C realtime clock on RTC 10 Click.
uint8_t rtc10_get_alarm_time_hours | ( | rtc10_t * | ctx | ) |
Get alarm time hours function.
ctx | Click object. |
@description This function sets alarm time hours data from the target ( _RTC10_ALM1HOUR or _RTC10_ALM2HOUR ) register address of DS3231M I2C realtime clock on RTC 10 Click.
uint8_t rtc10_get_alarm_time_minutes | ( | rtc10_t * | ctx | ) |
Get alarm time minutes function.
ctx | Click object. |
@description This function sets alarm time minutes data from the target ( _RTC10_ALM1MIN or _RTC10_ALM2MIN ) register address of DS3231M I2C realtime clock on RTC 10 Click.
uint8_t rtc10_get_alarm_time_seconds | ( | rtc10_t * | ctx | ) |
Get alarm time seconds function.
ctx | Click object. |
@description This function gets alarm time seconds data from the target ( _RTC10_ALM1SEC ) register address of DS3231M I2C realtime clock on RTC 10 Click.
uint8_t rtc10_get_century_flag | ( | rtc10_t * | ctx | ) |
Get century flag function.
ctx | Click object. |
@description This function gets century flag ( bit 7 ) from the target ( _RTC10_RTCMIN ) register address of DS3231M I2C realtime clock on RTC 10 Click.
void rtc10_get_date | ( | rtc10_t * | ctx, |
uint8_t * | day_of_the_week, | ||
uint8_t * | date_day, | ||
uint8_t * | date_month, | ||
uint8_t * | date_year ) |
Get time hours, minutes and seconds function.
ctx | Click object. |
day_of_the_week | pointer of date of the week data [ 1 : 7 ] |
date_day | pointer of date day data [ 1 : 31 ] |
date_month | pointer of date month data [ 1 : 12 ] |
date_year | pointer of date year data [ 0 : 99 ] |
@description This function gets date: day of the week, day, month and year data from the targets ( _RTC10_RTCWKDAY, _RTC10_RTCDATE, _RTC10_RTCMTH and _RTC10_RTCYEAR ) registers address of DS3231M I2C realtime clock on RTC 10 Click.
uint8_t rtc10_get_date_day | ( | rtc10_t * | ctx | ) |
Get date function.
ctx | Click object. |
@description This function gets date data from the target ( _RTC10_RTCDATE ) register address of DS3231M I2C realtime clock on RTC 10 Click.
uint8_t rtc10_get_date_month | ( | rtc10_t * | ctx | ) |
Get month function.
ctx | Click object. |
@description This function gets month data from the target ( _RTC10_RTCMTH ) register address of DS3231M I2C realtime clock on RTC 10 Click.
uint8_t rtc10_get_date_year | ( | rtc10_t * | ctx | ) |
Get year function.
ctx | Click object. |
@description This function gets year data from the target ( _RTC10_RTCYEAR ) register address of DS3231M I2C realtime clock on RTC 10 Click.
uint8_t rtc10_get_day_of_the_week | ( | rtc10_t * | ctx | ) |
Get day of the week function.
ctx | Click object. |
@description This function gets day of the week data from the target ( _RTC10_RTCWKDAY ) register address of DS3231M I2C realtime clock on RTC 10 Click.
void rtc10_get_first_alarm | ( | rtc10_t * | ctx, |
uint8_t * | time_days, | ||
uint8_t * | time_hours, | ||
uint8_t * | time_minutes, | ||
uint8_t * | time_seconds ) |
Get Alarm 1 time hours, minutes and seconds function.
ctx | Click object. |
time_days | pointer of time days [ 1 : 31 ] |
time_hours | pointer of time hours [ 0 h : 23 h ] |
time_minutes | pointer of time minutes [ 0 min : 59 min ] |
time_seconds | pointer of time seconds [ 0 sec : 59 sec ] |
@description This function gets Alarm 1 time: hours, minutes and seconds data from the targets ( _RTC10_ALM1SEC, _RTC10_ALM1MIN and _RTC10_ALM1HOUR ) registers address of DS3231M I2C realtime clock on RTC 10 Click.
void rtc10_get_second_alarm | ( | rtc10_t * | ctx, |
uint8_t * | time_days, | ||
uint8_t * | time_hours, | ||
uint8_t * | time_minutes ) |
Set Alarm 2 time: hours, minutes and seconds function.
ctx | Click object. |
time_days | pointer of time days [ 1 : 31 ] |
time_hours | pointer of time hours [ 0 h : 23 h ] |
time_minutes | pointer of time minutes [ 0 min : 59 min ] |
@description This function gets Alarm 2 time: hours, minutes and seconds data from the targets ( _RTC10_ALM2SEC, _RTC10_ALM2MIN and _RTC10_ALM2HOUR ) registers address of DS3231M I2C realtime clock on RTC 10 Click.
uint8_t rtc10_get_status | ( | rtc10_t * | ctx | ) |
Get configuration status function.
ctx | Click object. |
config_data | * - bit [ 7 ] : EOscillator stop flag. A logic 1 in this bit indicates that the oscillator either is stopped or was stopped for some period and could be used to judge the validity of the timekeeping data. This bit is set to logic 1 any time that the oscillator stops. This bit remains at logic 1 until written to logic 0. The following are examples of conditions that can cause the OSF bit to be set:
|
@description This function get configuration status value from the target ( _RTC10_STATUS ) registers address of DS3231M I2C realtime clock on RTC 10 Click.
float rtc10_get_temperature | ( | rtc10_t * | ctx | ) |
Get temperature function.
ctx | Click object. |
@description This function get value of temperature [ �C ] from the targets ( _RTC10_TEMPERATURE_MSB and _RTC10_TEMPERATURE_LSB ) registers address of DS3231M I2C realtime clock.
void rtc10_get_time | ( | rtc10_t * | ctx, |
uint8_t * | time_hours, | ||
uint8_t * | time_minutes, | ||
uint8_t * | time_seconds ) |
Get time hours, minutes and seconds function.
ctx | Click object. |
time_minutes | pointer of time minutes [ 0 min : 59 min ] |
time_hours | pointer of time hours [ 0 h : 23 h ] |
time_seconds | pointer of time seconds [ 0 sec : 59 sec ] |
@description This function gets time: hours, minutes and seconds data from the targets ( _RTC10_RTCHOUR, _RTC10_RTCMIN and _RTC10_RTCHOUR ) registers address of DS3231M I2C realtime clock on RTC 10 Click.
uint8_t rtc10_get_time_hours | ( | rtc10_t * | ctx | ) |
Get hours function.
ctx | Click object. |
@description This function gets hours data from the target ( _RTC10_RTCHOUR ) register address of DS3231M I2C realtime clock on RTC 10 Click.
uint8_t rtc10_get_time_minutes | ( | rtc10_t * | ctx | ) |
Get seconds function.
ctx | Click object. |
@description This function gets seconds data from the target ( _RTC10_RTCMIN ) register address of DS3231M I2C realtime clock on RTC 10 Click.
uint8_t rtc10_get_time_seconds | ( | rtc10_t * | ctx | ) |
Get seconds function.
ctx | Click object. |
@description This function gets seconds data from the target ( _RTC10_RTCSEC ) register address of DS3231M I2C realtime clock on RTC 10 Click.
void rtc10_hw_reset | ( | rtc10_t * | ctx | ) |
Hardware reset function.
ctx | Click object. |
@description This function hardware reset the DS3231M I2C realtime clock on RTC 10 Click by cleared to '0' state of the RST pin, wait the 100 ms, sets to '1' state of the RST pin and wait another the 100 ms..
RTC10_RETVAL rtc10_init | ( | rtc10_t * | ctx, |
rtc10_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.
uint8_t rtc10_read_byte | ( | rtc10_t * | ctx, |
uint8_t | reg_address ) |
Generic read function.
ctx | Click object. |
reg_address | 8-bit register address. |
@description This Function write the 8-bit of data to the target 8-bit register address of DS3231M I2C realtime clock on RTC 10 Click.
void rtc10_set_alarm_date_day | ( | rtc10_t * | ctx, |
uint8_t | date_day ) |
Set alarm days function.
ctx | Click object. |
date_day | Date days data [ 1 : 31 ] |
@description This function sets alarm time minutes data from the target ( _RTC10_ALM1DATE or _RTC10_ALM2DATE ) register address of DS3231M I2C realtime clock on RTC 10 Click.
void rtc10_set_alarm_time_hours | ( | rtc10_t * | ctx, |
uint8_t | hours ) |
Set alarm time seconds function.
ctx | Click object. |
hours | hours [ 0 h : 23 h ] |
@description This function sets alarm time hours data from the target ( _RTC10_ALM1HOUR or _RTC10_ALM2HOUR ) register address of DS3231M I2C realtime clock on RTC 10 Click.
void rtc10_set_alarm_time_minutes | ( | rtc10_t * | ctx, |
uint8_t | minutes ) |
Set alarm time seconds function.
ctx | Click object. |
minutes | Alarm time minutes [ 0 min : 59 min ] |
@description This function sets alarm time minutes data to the target ( _RTC10_ALM1MIN or _RTC10_ALM2MIN ) register address of DS3231M I2C realtime clock on RTC 10 Click.
void rtc10_set_alarm_time_seconds | ( | rtc10_t * | ctx, |
uint8_t | seconds ) |
Set alarm time seconds function.
ctx | Click object. |
seconds | Alarm time seconds [ 0 sec : 59 sec ] |
@description This function gets alarm time seconds data to the target ( _RTC10_ALM1SEC ) register address of DS3231M I2C realtime clock on RTC 10 Click.
void rtc10_set_century_flag | ( | rtc10_t * | ctx | ) |
Set century flag function.
ctx | Click object. |
@description This function sets century flag ( bit 7 ) to the target ( _RTC10_RTCMIN ) register address of DS3231M I2C realtime clock on RTC 10 Click.
void rtc10_set_config | ( | rtc10_t * | ctx, |
uint8_t | config_data ) |
Set configuration function.
ctx | Click object. |
config_data | - bit [ 7 ] : Enable oscillator. When set to logic 0, the oscillator is started. When set to logic 1, the oscillator is stopped when the device switches to VBAT. This bit is clear (logic 0) when power is first applied. When the device is powered by VCC, the oscillator is always on regardless of the status of the EOSC bit. When the oscillator is disabled, all register data is static
|
@description This function sets configuration value to the targets ( _RTC10_CONTROL ) registers address of DS3231M I2C realtime clock on RTC 10 Click.
void rtc10_set_date | ( | rtc10_t * | ctx, |
uint8_t | day_of_the_week, | ||
uint8_t | date_day, | ||
uint8_t | date_month, | ||
uint16_t | date_year ) |
Set date hours, minutes and seconds function.
ctx | Click object. |
day_of_the_week | Date of the week data [ 1 : 7 ] |
date_day | Date day data [ 1 : 31 ] |
date_month | Date month data [ 1 : 12 ] |
date_year | Date year data [ 0 : 99 ] |
@description This function sets date: day of the week, day, month and year data to the targets ( _RTC10_RTCWKDAY, _RTC10_RTCDATE, _RTC10_RTCMTH and _RTC10_RTCYEAR ) registers address of DS3231M I2C realtime clock on RTC 10 Click.
void rtc10_set_date_day | ( | rtc10_t * | ctx, |
uint8_t | date_day ) |
Set date function.
ctx | Click object. |
date_day | Date day data [ 1 : 31 ] |
@description This function sets date data from the target ( _RTC10_RTCDATE ) register address of DS3231M I2C realtime clock on RTC 10 Click.
void rtc10_set_date_month | ( | rtc10_t * | ctx, |
uint8_t | date_month ) |
Set month function.
ctx | Click object. |
date_month | Date month data [ 1 : 12 ] |
@description This function sets month data from the target ( _RTC10_RTCMTH ) register address of DS3231M I2C realtime clock on RTC 10 Click.
void rtc10_set_date_year | ( | rtc10_t * | ctx, |
uint16_t | date_year ) |
Set month function.
ctx | Click object. |
date_year | Date year data [ xx00 : xx99 ] |
@description This function sets year data to the target ( _RTC10_RTCYEAR ) register address of DS3231M I2C realtime clock on RTC 10 Click.
void rtc10_set_day_of_the_week | ( | rtc10_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 This function sets day of the week data to the target ( _RTC10_RTCWKDAY ) register address of DS3231M I2C realtime clock on RTC 10 Click.
void rtc10_set_first_alarm | ( | rtc10_t * | ctx, |
uint8_t | time_days, | ||
uint8_t | time_hours, | ||
uint8_t | time_minutes, | ||
uint8_t | time_seconds ) |
Set Alarm 1 time: hours, minutes and seconds function.
ctx | Click object. |
time_days | Time days data [ 1 : 31 ] |
time_hours | Time hours [ 0 h : 23 h ] |
time_minutes | Time minutes [ 0 min : 59 min ] |
time_seconds | Time seconds [ 0 sec : 59 sec ] |
@description This function sets Alarm 1 time: hours, minutes and seconds data to the targets ( _RTC10_ALM1SEC, _RTC10_ALM1MIN and _RTC10_ALM1HOUR ) registers address of DS3231M I2C realtime clock on RTC 10 Click.
void rtc10_set_second_alarm | ( | rtc10_t * | ctx, |
uint8_t | time_days, | ||
uint8_t | time_hours, | ||
uint8_t | time_minutes ) |
Set Alarm 2 time: hours, minutes and seconds function.
ctx | Click object. |
time_days | Time days [ 1 : 31 ] |
time_hours | Time hours [ 0 h : 23 h ] |
time_minutes | Time minutes [ 0 min : 59 min ] |
@description This function sets Alarm 2 time: hours, minutes and seconds data to the targets ( _RTC10_ALM2SEC, _RTC10_ALM2MIN and _RTC10_ALM2HOUR ) registers address of DS3231M I2C realtime clock on RTC 10 Click.
void rtc10_set_time | ( | rtc10_t * | ctx, |
uint8_t | time_hours, | ||
uint8_t | time_minutes, | ||
uint8_t | time_seconds ) |
Set time: hours, minutes and seconds function.
ctx | Click object. |
time_minutes | Time minutes [ 0 min : 59 min ] |
time_hours | Time hours [ 0 h : 23 h ] |
time_seconds | Time seconds [ 0 sec : 59 sec ] |
@description This function sets time: hours, minutes and seconds data to the targets ( _RTC10_RTCHOUR, _RTC10_RTCMIN and _RTC10_RTCHOUR ) registers address of DS3231M I2C realtime clock on RTC 10 Click.
void rtc10_set_time_hours | ( | rtc10_t * | ctx, |
uint8_t | hours ) |
Set hours function.
ctx | Click object. |
hours | Time hours [ 0 h : 23 h ] |
@description This function sets hours data to the target ( _RTC10_RTCHOUR ) register address of DS3231M I2C realtime clock on RTC 10 Click.
void rtc10_set_time_minutes | ( | rtc10_t * | ctx, |
uint8_t | minutes ) |
Generic read function.
ctx | Click object. |
minutes | Time minutes [ 0 min : 59 min ] |
@description This function sets minutes data to the target ( _RTC10_RTCMIN ) register address of DS3231M I2C realtime clock on RTC 10 Click.
void rtc10_set_time_seconds | ( | rtc10_t * | ctx, |
uint8_t | seconds ) |
Generic read function.
ctx | Click object. |
seconds | time seconds [ 0 sec : 59 sec ] |
@description This function sets seconds data to the target ( _RTC10_RTCSEC ) register address of DS3231M I2C realtime clock on RTC 10 Click.
void rtc10_write_byte | ( | rtc10_t * | ctx, |
uint8_t | reg_address, | ||
uint8_t | write_data ) |
Generic read function.
ctx | Click object. |
reg_address | 8-bit register address. |
write_data | 8-bit data to write |
@description This function write the 8-bit of data to thetarget 8-bit register address of DS3231M I2C realtime clock on RTC 10 Click..