rtc8 2.0.0.0
|
Functions | |
void | rtc8_cfg_setup (rtc8_cfg_t *cfg) |
Config Object Initialization function. | |
err_t | rtc8_init (rtc8_t *ctx, rtc8_cfg_t *cfg) |
Initialization function. | |
err_t | rtc8_default_cfg (rtc8_t *ctx) |
Click Default Configuration function. | |
err_t | rtc8_generic_write (rtc8_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
err_t | rtc8_generic_read (rtc8_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
err_t | rtc8_write_data (rtc8_t *ctx, uint8_t reg, uint8_t data_in) |
Write data ( Convert and send data in BCD format ) | |
err_t | rtc8_read_data (rtc8_t *ctx, uint8_t reg, uint8_t *data_out) |
Read one byte data from register in DEC format. | |
err_t | rtc8_get_uinx_time (rtc8_t *ctx, uint32_t *unix_time) |
Get current UNIX time. | |
err_t | rtc8_set_unix_time (rtc8_t *ctx, uint32_t unix_time) |
Set UNIX time. | |
err_t | rtc8_set_time (rtc8_t *ctx, rtc8_time_t *time_s) |
Set new time - 24 hour format. | |
err_t | rtc8_set_date (rtc8_t *ctx, rtc8_date_t *date_s) |
Set new date. | |
err_t | rtc8_set_alarm (rtc8_t *ctx, rtc8_alarm_t *alarm_s) |
Set Alarm. | |
uint8_t | rtc8_get_int_pin (rtc8_t *ctx) |
Get interrupt state. | |
void | rtc8_set_evi_pin (rtc8_t *ctx, uint8_t state) |
Set EVI(External Event Input) pin. | |
err_t | rtx8_get_time_and_date (rtc8_t *ctx, rtc8_time_t *time_s, rtc8_date_t *date_s) |
Get RTC data ( Time and Data ) | |
err_t | rtc8_reset_alarm_flag (rtc8_t *ctx) |
Reset alarm. | |
err_t | rtc8_get_status (rtc8_t *ctx, uint8_t *status) |
Get status. | |
err_t | rtc8_get_alarm_flag (rtc8_t *ctx, uint8_t *alarm_flag) |
Get Alarm flag. | |
void rtc8_cfg_setup | ( | rtc8_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
This function initializes click configuration structure to init state.
err_t rtc8_default_cfg | ( | rtc8_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.err_t 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 |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.err_t 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. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.err_t rtc8_get_alarm_flag | ( | rtc8_t * | ctx, |
uint8_t * | alarm_flag ) |
Get Alarm flag.
ctx | Click object. |
alarm_flag | Alarm flage ( ALARM IS ACTIVE or ALARM ISN'T ACTIVE) |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t rtc8_get_int_pin | ( | rtc8_t * | ctx | ) |
Get interrupt state.
ctx | Click object. |
err_t rtc8_get_status | ( | rtc8_t * | ctx, |
uint8_t * | status ) |
Get status.
ctx | Click object. |
status | Status register data |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc8_get_uinx_time | ( | rtc8_t * | ctx, |
uint32_t * | unix_time ) |
Get current UNIX time.
ctx | Click object. |
unix_time | UNIX time. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc8_init | ( | rtc8_t * | ctx, |
rtc8_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.err_t rtc8_read_data | ( | rtc8_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out ) |
Read one byte data from register in DEC format.
ctx | Click object. |
reg | Register Address |
data_out | Data output in decimal format |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc8_reset_alarm_flag | ( | rtc8_t * | ctx | ) |
Reset alarm.
ctx | Click object. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc8_set_alarm | ( | rtc8_t * | ctx, |
rtc8_alarm_t * | alarm_s ) |
Set Alarm.
ctx | Click object. |
alarm_s | Alarm Structure ( weekdays, hours, minutes ) |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_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) |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void rtc8_set_evi_pin | ( | rtc8_t * | ctx, |
uint8_t | state ) |
Set EVI(External Event Input) pin.
ctx | Click object. |
state | - EVI state |
err_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) ) |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc8_set_unix_time | ( | rtc8_t * | ctx, |
uint32_t | unix_time ) |
Set UNIX time.
ctx | Click object. |
unix_time | 4 byte unix time |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc8_write_data | ( | rtc8_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in ) |
Write data ( Convert and send data in BCD format )
ctx | Click object. |
reg | Register Address |
data_in | Data in decimal format |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t 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) |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.