rtc8
2.0.0.0
|
Functions | |
void | rtc8_cfg_setup (rtc8_cfg_t *cfg) |
Config Object Initialization function. More... | |
RTC8_RETVAL | rtc8_init (rtc8_t *ctx, rtc8_cfg_t *cfg) |
Initialization function. More... | |
void | rtc8_default_cfg (rtc8_t *ctx) |
Click Default Configuration function. More... | |
void | rtc8_generic_write (rtc8_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. More... | |
void | rtc8_generic_read (rtc8_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. More... | |
uint8_t | rtc8_write_data_bcd_format (rtc8_t *ctx, uint8_t reg, uint8_t _data) |
Write data ( Convert and send data in BCD format ) More... | |
uint8_t | rtc8_read_data_bcd_format (rtc8_t *ctx, uint8_t reg) |
Read one byte data from register in DEC format. More... | |
uint32_t | rtc8_get_uinx_time (rtc8_t *ctx) |
Get current UNIX time. More... | |
void | rtc8_set_unix_time (rtc8_t *ctx, int32_t unix_time) |
Set UNIX time. More... | |
uint8_t | rtc8_set_time (rtc8_t *ctx, rtc8_time_t *time_s) |
Set new time - 24 hour format. More... | |
uint8_t | rtc8_set_date (rtc8_t *ctx, rtc8_date_t *date_s) |
Set new date. More... | |
uint8_t | rtc8_set_alarm (rtc8_t *ctx, rtc8_alarm_t *alarm_s) |
Set Alarm. More... | |
uint8_t | rtc8_get_interrupt_state (rtc8_t *ctx) |
Get interrupt state. More... | |
void | rtc8_set_external_event_input (rtc8_t *ctx, uint8_t state) |
Set EVI(External Event Input) pin. More... | |
void | rtx8_get_time_and_date (rtc8_t *ctx, rtc8_time_t *time_s, rtc8_date_t *date_s) |
Get RTC data ( Time and Data ) More... | |
void | rtc8_reset_alarm_flag (rtc8_t *ctx) |
Reset alarm. More... | |
uint8_t | rtc8_get_status (rtc8_t *ctx) |
Get status. More... | |
uint8_t | rtc8_get_alarm_flag (rtc8_t *ctx) |
Get Alarm flag. More... | |
void rtc8_cfg_setup | ( | rtc8_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void rtc8_default_cfg | ( | rtc8_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for RTC 8 click.
void rtc8_generic_read | ( | rtc8_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 rtc8_generic_write | ( | rtc8_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 rtc8_get_alarm_flag | ( | rtc8_t * | ctx | ) |
Get Alarm flag.
ctx | Click object. |
uint8_t rtc8_get_interrupt_state | ( | rtc8_t * | ctx | ) |
Get interrupt state.
ctx | Click object. |
uint8_t rtc8_get_status | ( | rtc8_t * | ctx | ) |
Get status.
ctx | Click object. |
uint32_t rtc8_get_uinx_time | ( | rtc8_t * | ctx | ) |
Get current UNIX time.
ctx | Click object. |
RTC8_RETVAL rtc8_init | ( | rtc8_t * | ctx, |
rtc8_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 rtc8_read_data_bcd_format | ( | rtc8_t * | ctx, |
uint8_t | reg | ||
) |
Read one byte data from register in DEC format.
ctx | Click object. |
reg | Register Address |
void rtc8_reset_alarm_flag | ( | rtc8_t * | ctx | ) |
Reset alarm.
ctx | Click object. |
uint8_t rtc8_set_alarm | ( | rtc8_t * | ctx, |
rtc8_alarm_t * | alarm_s | ||
) |
Set Alarm.
ctx | Click object. |
alarm_s | Alarm Structure ( weekdays, hours, minutes ) |
uint8_t rtc8_set_date | ( | rtc8_t * | ctx, |
rtc8_date_t * | date_s | ||
) |
Set new date.
ctx | Click object. |
date_s | Date Structure ( New Hours (0 - 31), New minutes (1 - 12), New secconds (0 - 99) 2000 year ... 2099 year) |
void rtc8_set_external_event_input | ( | rtc8_t * | ctx, |
uint8_t | state | ||
) |
Set EVI(External Event Input) pin.
ctx | Click object. |
state | - EVI state |
uint8_t rtc8_set_time | ( | rtc8_t * | ctx, |
rtc8_time_t * | time_s | ||
) |
Set new time - 24 hour format.
ctx | Click object. |
time_s | Time Structure ( New Hours (0 - 23), New minutes (0 - 59), New secconds (0 - 59) ) |
void rtc8_set_unix_time | ( | rtc8_t * | ctx, |
int32_t | unix_time | ||
) |
Set UNIX time.
ctx | Click object. |
unix_time | 4 byte unix time |
uint8_t rtc8_write_data_bcd_format | ( | rtc8_t * | ctx, |
uint8_t | reg, | ||
uint8_t | _data | ||
) |
Write data ( Convert and send data in BCD format )
ctx | Click object. |
reg | Register Address |
_data | Data |
void rtx8_get_time_and_date | ( | rtc8_t * | ctx, |
rtc8_time_t * | time_s, | ||
rtc8_date_t * | date_s | ||
) |
Get RTC data ( Time and Data )
ctx | Click object. |
time_s | Time Structure ( New Hours (0 - 23), New minutes (0 - 59), New secconds (0 - 59) ) |
date_s | Date Structure ( New Hours (0 - 31), New minutes (1 - 12), New secconds (0 - 99) 2000 year ... 2099 year) |