rtc17
2.0.0.0
|
API for configuring and manipulating RTC 17 Click driver. More...
Modules | |
RTC 17 Registers List | |
List of registers of RTC 17 Click driver. | |
RTC 17 Registers Settings | |
Settings for registers of RTC 17 Click driver. | |
RTC 17 MikroBUS Map | |
MikroBUS pin mapping of RTC 17 Click driver. | |
Functions | |
void | rtc17_cfg_setup (rtc17_cfg_t *cfg) |
RTC 17 configuration object setup function. More... | |
err_t | rtc17_init (rtc17_t *ctx, rtc17_cfg_t *cfg) |
RTC 17 initialization function. More... | |
err_t | rtc17_default_cfg (rtc17_t *ctx) |
RTC 17 default configuration function. More... | |
err_t | rtc17_write_register (rtc17_t *ctx, uint8_t reg, uint8_t data_in) |
RTC 17 write register function. More... | |
err_t | rtc17_write_multiple_registers (rtc17_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len) |
RTC 17 write multiple registers function. More... | |
err_t | rtc17_read_register (rtc17_t *ctx, uint8_t reg, uint8_t *data_out) |
RTC 17 read register function. More... | |
err_t | rtc17_read_multiple_registers (rtc17_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
RTC 17 read multiple registers function. More... | |
uint8_t | rtc17_get_int_pin (rtc17_t *ctx) |
RTC 17 get int pin function. More... | |
err_t | rtc17_clear_interrupts (rtc17_t *ctx) |
RTC 17 clear interrupts function. More... | |
err_t | rtc17_set_time (rtc17_t *ctx, rtc17_time_t *time) |
RTC 17 set time function. More... | |
err_t | rtc17_read_time (rtc17_t *ctx, rtc17_time_t *time) |
RTC 17 read time function. More... | |
err_t | rtc17_set_date (rtc17_t *ctx, rtc17_date_t *date) |
RTC 17 set date function. More... | |
err_t | rtc17_read_date (rtc17_t *ctx, rtc17_date_t *date) |
RTC 17 read date function. More... | |
API for configuring and manipulating RTC 17 Click driver.
void rtc17_cfg_setup | ( | rtc17_cfg_t * | cfg | ) |
RTC 17 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See rtc17_cfg_t object definition for detailed explanation. |
err_t rtc17_clear_interrupts | ( | rtc17_t * | ctx | ) |
RTC 17 clear interrupts function.
This function clears the interrupt and alarm flag bits in Control 2 register.
[in] | ctx | : Click context object. See rtc17_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc17_default_cfg | ( | rtc17_t * | ctx | ) |
RTC 17 default configuration function.
This function executes a default configuration of RTC 17 click board.
[in] | ctx | : Click context object. See rtc17_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t rtc17_get_int_pin | ( | rtc17_t * | ctx | ) |
RTC 17 get int pin function.
This function returns the INT pin logic state.
[in] | ctx | : Click context object. See rtc17_t object definition for detailed explanation. |
err_t rtc17_init | ( | rtc17_t * | ctx, |
rtc17_cfg_t * | cfg | ||
) |
RTC 17 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See rtc17_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See rtc17_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc17_read_date | ( | rtc17_t * | ctx, |
rtc17_date_t * | date | ||
) |
RTC 17 read date function.
This function reads the current date values - day of week, day, month and year.
[in] | ctx | : Click context object. See rtc17_t object definition for detailed explanation. |
[out] | date | : Date object structure. See rtc17_date_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc17_read_multiple_registers | ( | rtc17_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | rx_buf, | ||
uint8_t | rx_len | ||
) |
RTC 17 read multiple registers 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 rtc17_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | rx_buf | : Output read data. |
[in] | rx_len | : Number of bytes to be read [up to 16 bytes]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc17_read_register | ( | rtc17_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out | ||
) |
RTC 17 read register function.
This function reads a data byte from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See rtc17_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 rtc17_read_time | ( | rtc17_t * | ctx, |
rtc17_time_t * | time | ||
) |
RTC 17 read time function.
This function reads the current time values - second, minute and hour.
[in] | ctx | : Click context object. See rtc17_t object definition for detailed explanation. |
[out] | time | : Time object structure. See rtc17_time_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc17_set_date | ( | rtc17_t * | ctx, |
rtc17_date_t * | date | ||
) |
RTC 17 set date function.
This function sets the starting date values - day of week, day, month and year.
[in] | ctx | : Click context object. See rtc17_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 rtc17_date_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc17_set_time | ( | rtc17_t * | ctx, |
rtc17_time_t * | time | ||
) |
RTC 17 set time function.
This function sets the starting time values - second, minute and hour.
[in] | ctx | : Click context object. See rtc17_t object definition for detailed explanation. |
[in] | time | : Time object structure that carries second, minute and hour values in Decimal format. See rtc17_time_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc17_write_multiple_registers | ( | rtc17_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | tx_buf, | ||
uint8_t | tx_len | ||
) |
RTC 17 write multiple registers 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 rtc17_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | tx_buf | : Data to be written. |
[in] | tx_len | : Number of bytes to be written [up to 16 bytes]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc17_write_register | ( | rtc17_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in | ||
) |
RTC 17 write register function.
This function writes a desired data byte to the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See rtc17_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.