rtc16
2.0.0.0
|
API for configuring and manipulating RTC 16 Click driver. More...
Modules | |
RTC 16 Registers List | |
List of registers of RTC 16 Click driver. | |
RTC 16 Registers Settings | |
Settings for registers of RTC 16 Click driver. | |
RTC 16 MikroBUS Map | |
MikroBUS pin mapping of RTC 16 Click driver. | |
Functions | |
void | rtc16_cfg_setup (rtc16_cfg_t *cfg) |
RTC 16 configuration object setup function. More... | |
err_t | rtc16_init (rtc16_t *ctx, rtc16_cfg_t *cfg) |
RTC 16 initialization function. More... | |
err_t | rtc16_default_cfg (rtc16_t *ctx) |
RTC 16 default configuration function. More... | |
err_t | rtc16_write_register (rtc16_t *ctx, uint8_t reg, uint8_t data_in) |
RTC 16 write register function. More... | |
err_t | rtc16_write_multiple_registers (rtc16_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len) |
RTC 16 write multiple registers function. More... | |
err_t | rtc16_read_register (rtc16_t *ctx, uint8_t reg, uint8_t *data_out) |
RTC 16 read register function. More... | |
err_t | rtc16_read_register_fast (rtc16_t *ctx, uint8_t reg, uint8_t *data_out) |
RTC 16 read register fast function. More... | |
err_t | rtc16_read_multiple_registers (rtc16_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
RTC 16 read multiple registers function. More... | |
err_t | rtc16_read_multiple_registers_fast (rtc16_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
RTC 16 read multiple registers fast function. More... | |
uint8_t | rtc16_get_int_pin (rtc16_t *ctx) |
RTC 16 get int pin function. More... | |
err_t | rtc16_clear_interrupts (rtc16_t *ctx) |
RTC 16 clear interrupts function. More... | |
err_t | rtc16_set_time (rtc16_t *ctx, rtc16_time_t *time) |
RTC 16 set time function. More... | |
err_t | rtc16_read_time (rtc16_t *ctx, rtc16_time_t *time) |
RTC 16 read time function. More... | |
err_t | rtc16_set_date (rtc16_t *ctx, rtc16_date_t *date) |
RTC 16 set date function. More... | |
err_t | rtc16_read_date (rtc16_t *ctx, rtc16_date_t *date) |
RTC 16 read date function. More... | |
API for configuring and manipulating RTC 16 Click driver.
void rtc16_cfg_setup | ( | rtc16_cfg_t * | cfg | ) |
RTC 16 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See rtc16_cfg_t object definition for detailed explanation. |
err_t rtc16_clear_interrupts | ( | rtc16_t * | ctx | ) |
RTC 16 clear interrupts function.
This function clears the interrupt and alarm flag bits in Control 2 register.
[in] | ctx | : Click context object. See rtc16_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc16_default_cfg | ( | rtc16_t * | ctx | ) |
RTC 16 default configuration function.
This function executes a default configuration of RTC 16 click board.
[in] | ctx | : Click context object. See rtc16_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t rtc16_get_int_pin | ( | rtc16_t * | ctx | ) |
RTC 16 get int pin function.
This function returns the INT pin logic state.
[in] | ctx | : Click context object. See rtc16_t object definition for detailed explanation. |
err_t rtc16_init | ( | rtc16_t * | ctx, |
rtc16_cfg_t * | cfg | ||
) |
RTC 16 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See rtc16_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See rtc16_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc16_read_date | ( | rtc16_t * | ctx, |
rtc16_date_t * | date | ||
) |
RTC 16 read date function.
This function reads the current date values - day of week, day, month and year.
[in] | ctx | : Click context object. See rtc16_t object definition for detailed explanation. |
[out] | date | : Date object structure. See rtc16_date_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc16_read_multiple_registers | ( | rtc16_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | rx_buf, | ||
uint8_t | rx_len | ||
) |
RTC 16 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 rtc16_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 rtc16_read_multiple_registers_fast | ( | rtc16_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | rx_buf, | ||
uint8_t | rx_len | ||
) |
RTC 16 read multiple registers fast function.
This function reads a desired number of data bytes starting from the selected register performing fast read command by using I2C serial interface.
[in] | ctx | : Click context object. See rtc16_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 rtc16_read_register | ( | rtc16_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out | ||
) |
RTC 16 read register function.
This function reads a data byte from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See rtc16_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 rtc16_read_register_fast | ( | rtc16_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out | ||
) |
RTC 16 read register fast function.
This function reads a data byte from the selected register performing fast read command by using I2C serial interface.
[in] | ctx | : Click context object. See rtc16_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 rtc16_read_time | ( | rtc16_t * | ctx, |
rtc16_time_t * | time | ||
) |
RTC 16 read time function.
This function reads the current time values - second, minute and hour.
[in] | ctx | : Click context object. See rtc16_t object definition for detailed explanation. |
[out] | time | : Time object structure. See rtc16_time_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc16_set_date | ( | rtc16_t * | ctx, |
rtc16_date_t * | date | ||
) |
RTC 16 set date function.
This function sets the starting date values - day of week, day, month and year.
[in] | ctx | : Click context object. See rtc16_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 rtc16_date_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc16_set_time | ( | rtc16_t * | ctx, |
rtc16_time_t * | time | ||
) |
RTC 16 set time function.
This function sets the starting time values - second, minute and hour.
[in] | ctx | : Click context object. See rtc16_t object definition for detailed explanation. |
[in] | time | : Time object structure that carries second, minute and hour values in Decimal format. See rtc16_time_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc16_write_multiple_registers | ( | rtc16_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | tx_buf, | ||
uint8_t | tx_len | ||
) |
RTC 16 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 rtc16_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 rtc16_write_register | ( | rtc16_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in | ||
) |
RTC 16 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 rtc16_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.