rtc19
2.1.0.0
|
API for configuring and manipulating RTC 19 Click driver. More...
Modules | |
RTC 19 Registers List | |
List of registers of RTC 19 Click driver. | |
RTC 19 Registers Settings | |
Settings for registers of RTC 19 Click driver. | |
RTC 19 MikroBUS Map | |
MikroBUS pin mapping of RTC 19 Click driver. | |
Functions | |
void | rtc19_cfg_setup (rtc19_cfg_t *cfg) |
RTC 19 configuration object setup function. More... | |
err_t | rtc19_init (rtc19_t *ctx, rtc19_cfg_t *cfg) |
RTC 19 initialization function. More... | |
err_t | rtc19_default_cfg (rtc19_t *ctx) |
RTC 19 default configuration function. More... | |
err_t | rtc19_generic_write (rtc19_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
RTC 19 I2C writing function. More... | |
err_t | rtc19_generic_read (rtc19_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
RTC 19 I2C reading function. More... | |
err_t | rtc19_write_register (rtc19_t *ctx, uint8_t reg, uint8_t data_in) |
RTC 19 write register function. More... | |
err_t | rtc19_read_register (rtc19_t *ctx, uint8_t reg, uint8_t *data_out) |
RTC 19 read register function. More... | |
void | rtc19_set_din_pin (rtc19_t *ctx, uint8_t state) |
RTC 19 set din pin function. More... | |
uint8_t | rtc19_get_psw_pin (rtc19_t *ctx) |
RTC 19 get psw pin function. More... | |
uint8_t | rtc19_get_inta_pin (rtc19_t *ctx) |
RTC 19 get inta pin function. More... | |
uint8_t | rtc19_get_intb_pin (rtc19_t *ctx) |
RTC 19 get intb pin function. More... | |
err_t | rtc19_set_time (rtc19_t *ctx, rtc19_time_t *time) |
RTC 19 set time function. More... | |
err_t | rtc19_read_time (rtc19_t *ctx, rtc19_time_t *time) |
RTC 19 read time function. More... | |
err_t | rtc19_set_date (rtc19_t *ctx, rtc19_date_t *date) |
RTC 19 set date function. More... | |
err_t | rtc19_read_date (rtc19_t *ctx, rtc19_date_t *date) |
RTC 19 read date function. More... | |
err_t | rtc19_reset_device (rtc19_t *ctx) |
RTC 19 reset device function. More... | |
err_t | rtc19_clear_interrupts (rtc19_t *ctx) |
RTC 19 clear interrupts function. More... | |
API for configuring and manipulating RTC 19 Click driver.
void rtc19_cfg_setup | ( | rtc19_cfg_t * | cfg | ) |
RTC 19 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See rtc19_cfg_t object definition for detailed explanation. |
err_t rtc19_clear_interrupts | ( | rtc19_t * | ctx | ) |
RTC 19 clear interrupts function.
This function clears interrupts by reading the STATUS register.
[in] | ctx | : Click context object. See rtc19_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc19_default_cfg | ( | rtc19_t * | ctx | ) |
RTC 19 default configuration function.
This function executes a default configuration of RTC 19 click board.
[in] | ctx | : Click context object. See rtc19_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc19_generic_read | ( | rtc19_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
RTC 19 I2C reading function.
This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See rtc19_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc19_generic_write | ( | rtc19_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
RTC 19 I2C writing function.
This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See rtc19_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t rtc19_get_inta_pin | ( | rtc19_t * | ctx | ) |
RTC 19 get inta pin function.
This function returns the INTA pin logic state.
[in] | ctx | : Click context object. See rtc19_t object definition for detailed explanation. |
uint8_t rtc19_get_intb_pin | ( | rtc19_t * | ctx | ) |
RTC 19 get intb pin function.
This function returns the INTB pin logic state.
[in] | ctx | : Click context object. See rtc19_t object definition for detailed explanation. |
uint8_t rtc19_get_psw_pin | ( | rtc19_t * | ctx | ) |
RTC 19 get psw pin function.
This function returns the PSW pin logic state.
[in] | ctx | : Click context object. See rtc19_t object definition for detailed explanation. |
err_t rtc19_init | ( | rtc19_t * | ctx, |
rtc19_cfg_t * | cfg | ||
) |
RTC 19 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See rtc19_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See rtc19_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc19_read_date | ( | rtc19_t * | ctx, |
rtc19_date_t * | date | ||
) |
RTC 19 read date function.
This function reads the current date values - day of week, day, month and year.
[in] | ctx | : Click context object. See rtc19_t object definition for detailed explanation. |
[out] | date | : Date object structure. See rtc19_date_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc19_read_register | ( | rtc19_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out | ||
) |
RTC 19 read register function.
This function reads data from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See rtc19_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc19_read_time | ( | rtc19_t * | ctx, |
rtc19_time_t * | time | ||
) |
RTC 19 read time function.
This function reads the current time values - second, minute and hour.
[in] | ctx | : Click context object. See rtc19_t object definition for detailed explanation. |
[out] | time | : Time object structure. See rtc19_time_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc19_reset_device | ( | rtc19_t * | ctx | ) |
RTC 19 reset device function.
This function performs the device reset by writing to the RTC_RESET register.
[in] | ctx | : Click context object. See rtc19_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc19_set_date | ( | rtc19_t * | ctx, |
rtc19_date_t * | date | ||
) |
RTC 19 set date function.
This function sets the starting date values - day of week, day, month and year.
[in] | ctx | : Click context object. See rtc19_t object definition for detailed explanation. |
[in] | date | : Date object structure that carries day of week, day, month and year values in Decimal format. See rtc19_date_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void rtc19_set_din_pin | ( | rtc19_t * | ctx, |
uint8_t | state | ||
) |
RTC 19 set din pin function.
This function sets the DIN pin logic state.
[in] | ctx | : Click context object. See rtc19_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
err_t rtc19_set_time | ( | rtc19_t * | ctx, |
rtc19_time_t * | time | ||
) |
RTC 19 set time function.
This function sets the starting time values - second, minute and hour.
[in] | ctx | : Click context object. See rtc19_t object definition for detailed explanation. |
[in] | time | : Time object structure that carries second, minute and hour values in Decimal format. See rtc19_time_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc19_write_register | ( | rtc19_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in | ||
) |
RTC 19 write register function.
This function writes data to the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See rtc19_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.