rtc18
2.0.0.0
|
API for configuring and manipulating RTC 18 Click driver. More...
Modules | |
RTC 18 Registers List | |
List of registers of RTC 18 Click driver. | |
RTC 18 Registers Settings | |
Settings for registers of RTC 18 Click driver. | |
RTC 18 MikroBUS Map | |
MikroBUS pin mapping of RTC 18 Click driver. | |
Functions | |
void | rtc18_cfg_setup (rtc18_cfg_t *cfg) |
RTC 18 configuration object setup function. More... | |
err_t | rtc18_init (rtc18_t *ctx, rtc18_cfg_t *cfg) |
RTC 18 initialization function. More... | |
err_t | rtc18_default_cfg (rtc18_t *ctx) |
RTC 18 default configuration function. More... | |
err_t | rtc18_generic_write (rtc18_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
RTC 18 I2C writing function. More... | |
err_t | rtc18_generic_read (rtc18_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
RTC 18 I2C reading function. More... | |
err_t | rtc18_write_register (rtc18_t *ctx, uint8_t reg, uint8_t data_in) |
RTC 18 write register function. More... | |
err_t | rtc18_read_register (rtc18_t *ctx, uint8_t reg, uint8_t *data_out) |
RTC 18 read register function. More... | |
void | rtc18_set_evi_pin (rtc18_t *ctx, uint8_t state) |
RTC 18 set EVI pin function. More... | |
uint8_t | rtc18_get_int_pin (rtc18_t *ctx) |
RTC 18 get int pin function. More... | |
err_t | rtc18_clear_periodic_interrupt (rtc18_t *ctx) |
RTC 18 clear periodic interrupt function. More... | |
err_t | rtc18_set_time (rtc18_t *ctx, rtc18_time_t *time) |
RTC 18 set time function. More... | |
err_t | rtc18_read_time (rtc18_t *ctx, rtc18_time_t *time) |
RTC 18 read time function. More... | |
err_t | rtc18_set_date (rtc18_t *ctx, rtc18_date_t *date) |
RTC 18 set date function. More... | |
err_t | rtc18_read_date (rtc18_t *ctx, rtc18_date_t *date) |
RTC 18 read date function. More... | |
err_t | rtc18_read_temperature (rtc18_t *ctx, float *temperature) |
RTC 18 read temperature function. More... | |
err_t | rtc18_write_eeprom (rtc18_t *ctx, uint8_t address, uint8_t data_in) |
RTC 18 write eeprom function. More... | |
err_t | rtc18_read_eeprom (rtc18_t *ctx, uint8_t address, uint8_t *data_out) |
RTC 18 read eeprom function. More... | |
API for configuring and manipulating RTC 18 Click driver.
void rtc18_cfg_setup | ( | rtc18_cfg_t * | cfg | ) |
RTC 18 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See rtc18_cfg_t object definition for detailed explanation. |
err_t rtc18_clear_periodic_interrupt | ( | rtc18_t * | ctx | ) |
RTC 18 clear periodic interrupt function.
This function clears the periodic interrupt flag (UF) bit in STATUS register.
[in] | ctx | : Click context object. See rtc18_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc18_default_cfg | ( | rtc18_t * | ctx | ) |
RTC 18 default configuration function.
This function executes a default configuration of RTC 18 click board.
[in] | ctx | : Click context object. See rtc18_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc18_generic_read | ( | rtc18_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
RTC 18 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 rtc18_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 rtc18_generic_write | ( | rtc18_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
RTC 18 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 rtc18_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 rtc18_get_int_pin | ( | rtc18_t * | ctx | ) |
RTC 18 get int pin function.
This function returns the INT pin logic state.
[in] | ctx | : Click context object. See rtc18_t object definition for detailed explanation. |
err_t rtc18_init | ( | rtc18_t * | ctx, |
rtc18_cfg_t * | cfg | ||
) |
RTC 18 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See rtc18_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See rtc18_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc18_read_date | ( | rtc18_t * | ctx, |
rtc18_date_t * | date | ||
) |
RTC 18 read date function.
This function reads the current date values - day of week, day, month and year.
[in] | ctx | : Click context object. See rtc18_t object definition for detailed explanation. |
[out] | date | : Date object structure. See rtc18_date_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc18_read_eeprom | ( | rtc18_t * | ctx, |
uint8_t | address, | ||
uint8_t * | data_out | ||
) |
RTC 18 read eeprom function.
This function reads a data byte from the selected EEPROM address by using I2C serial interface.
[in] | ctx | : Click context object. See rtc18_t object definition for detailed explanation. |
[in] | address | : EEPROM address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc18_read_register | ( | rtc18_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out | ||
) |
RTC 18 read register function.
This function reads a data byte from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See rtc18_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 rtc18_read_temperature | ( | rtc18_t * | ctx, |
float * | temperature | ||
) |
RTC 18 read temperature function.
This function reads temperature measurements in Celsius.
[in] | ctx | : Click context object. See rtc18_t object definition for detailed explanation. |
[out] | temperature | : Temperature in Celsius. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc18_read_time | ( | rtc18_t * | ctx, |
rtc18_time_t * | time | ||
) |
RTC 18 read time function.
This function reads the current time values - second, minute and hour.
[in] | ctx | : Click context object. See rtc18_t object definition for detailed explanation. |
[out] | time | : Time object structure. See rtc18_time_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc18_set_date | ( | rtc18_t * | ctx, |
rtc18_date_t * | date | ||
) |
RTC 18 set date function.
This function sets the starting date values - day of week, day, month and year.
[in] | ctx | : Click context object. See rtc18_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 rtc18_date_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void rtc18_set_evi_pin | ( | rtc18_t * | ctx, |
uint8_t | state | ||
) |
RTC 18 set EVI pin function.
This function sets the EVI pin logic state.
[in] | ctx | : Click context object. See rtc18_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
err_t rtc18_set_time | ( | rtc18_t * | ctx, |
rtc18_time_t * | time | ||
) |
RTC 18 set time function.
This function sets the starting time values - second, minute and hour.
[in] | ctx | : Click context object. See rtc18_t object definition for detailed explanation. |
[in] | time | : Time object structure that carries second, minute and hour values in Decimal format. See rtc18_time_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc18_write_eeprom | ( | rtc18_t * | ctx, |
uint8_t | address, | ||
uint8_t | data_in | ||
) |
RTC 18 write eeprom function.
This function writes a desired data byte to the selected EEPROM address by using I2C serial interface.
[in] | ctx | : Click context object. See rtc18_t object definition for detailed explanation. |
[in] | address | : EEPROM address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc18_write_register | ( | rtc18_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in | ||
) |
RTC 18 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 rtc18_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.