|
rtc15 2.2.0
|
API for configuring and manipulating RTC 15 Click driver. More...
Topics | |
| RTC 15 Registers List | |
| List of registers of RTC 15 Click driver. | |
| RTC 15 Registers Settings | |
| Settings for registers of RTC 15 Click driver. | |
| RTC 15 MikroBUS Map | |
| MikroBUS pin mapping of RTC 15 Click driver. | |
Functions | |
| void | rtc15_cfg_setup (rtc15_cfg_t *cfg) |
| RTC 15 configuration object setup function. | |
| err_t | rtc15_init (rtc15_t *ctx, rtc15_cfg_t *cfg) |
| RTC 15 initialization function. | |
| err_t | rtc15_default_cfg (rtc15_t *ctx) |
| RTC 15 default configuration function. | |
| err_t | rtc15_write_regs (rtc15_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
| RTC 15 write multiple registers function. | |
| err_t | rtc15_read_regs (rtc15_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
| RTC 15 read multiple registers function. | |
| err_t | rtc15_write_reg (rtc15_t *ctx, uint8_t reg, uint8_t data_in) |
| RTC 15 write single register function. | |
| err_t | rtc15_read_reg (rtc15_t *ctx, uint8_t reg, uint8_t *data_out) |
| RTC 15 read single register function. | |
| void | rtc15_enable_device (rtc15_t *ctx) |
| RTC 15 enable device function. | |
| void | rtc15_disable_device (rtc15_t *ctx) |
| RTC 15 disable device function. | |
| void | rtc15_enable_clkout (rtc15_t *ctx) |
| RTC 15 enable clock output function. | |
| void | rtc15_disable_clkout (rtc15_t *ctx) |
| RTC 15 disable clock output function. | |
| uint8_t | rtc15_get_int_pin (rtc15_t *ctx) |
| RTC 15 get interrupt pin function. | |
| err_t | rtc15_check_communication (rtc15_t *ctx) |
| RTC 15 check communication function. | |
| err_t | rtc15_set_time (rtc15_t *ctx, rtc15_time_t *time) |
| RTC 15 set time function. | |
| err_t | rtc15_read_time (rtc15_t *ctx, rtc15_time_t *time) |
| RTC 15 read time function. | |
| err_t | rtc15_set_date (rtc15_t *ctx, rtc15_date_t *date) |
| RTC 15 set date function. | |
| err_t | rtc15_read_date (rtc15_t *ctx, rtc15_date_t *date) |
| RTC 15 read date function. | |
API for configuring and manipulating RTC 15 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
| void rtc15_cfg_setup | ( | rtc15_cfg_t * | cfg | ) |
RTC 15 configuration object setup function.
This function initializes Click configuration structure to initial values.
| [out] | cfg | : Click configuration structure. See rtc15_cfg_t object definition for detailed explanation. |
| err_t rtc15_check_communication | ( | rtc15_t * | ctx | ) |
RTC 15 check communication function.
This function performs a write-read test on the RAM register to verify communication.
| [in] | ctx | : Click context object. See rtc15_t object definition for detailed explanation. |
0 - Success (communication established), -1 - Error. | err_t rtc15_default_cfg | ( | rtc15_t * | ctx | ) |
RTC 15 default configuration function.
This function executes a default configuration of RTC 15 Click board.
| [in] | ctx | : Click context object. See rtc15_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | void rtc15_disable_clkout | ( | rtc15_t * | ctx | ) |
RTC 15 disable clock output function.
This function sets the CLE pin to low logic state.
| [in] | ctx | : Click context object. See rtc15_t object definition for detailed explanation. |
| void rtc15_disable_device | ( | rtc15_t * | ctx | ) |
RTC 15 disable device function.
This function sets the EN pin to low logic state.
| [in] | ctx | : Click context object. See rtc15_t object definition for detailed explanation. |
| void rtc15_enable_clkout | ( | rtc15_t * | ctx | ) |
RTC 15 enable clock output function.
This function sets the CLE pin to high logic state.
| [in] | ctx | : Click context object. See rtc15_t object definition for detailed explanation. |
| void rtc15_enable_device | ( | rtc15_t * | ctx | ) |
RTC 15 enable device function.
This function sets the EN pin to high logic state.
| [in] | ctx | : Click context object. See rtc15_t object definition for detailed explanation. |
| uint8_t rtc15_get_int_pin | ( | rtc15_t * | ctx | ) |
RTC 15 get interrupt pin function.
This function returns the logic state of the INT pin.
| [in] | ctx | : Click context object. See rtc15_t object definition for detailed explanation. |
| err_t rtc15_init | ( | rtc15_t * | ctx, |
| rtc15_cfg_t * | cfg ) |
RTC 15 initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
| [out] | ctx | : Click context object. See rtc15_t object definition for detailed explanation. |
| [in] | cfg | : Click configuration structure. See rtc15_cfg_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t rtc15_read_date | ( | rtc15_t * | ctx, |
| rtc15_date_t * | date ) |
RTC 15 read date function.
This function reads the current date (day, day of week, month, year) from the RTC.
| [in] | ctx | : Click context object. See rtc15_t object definition for detailed explanation. |
| [out] | date | : Pointer to the date structure to store the read values. See rtc15_date_t object definition for structure fields. |
0 - Success, -1 - Error. | err_t rtc15_read_reg | ( | rtc15_t * | ctx, |
| uint8_t | reg, | ||
| uint8_t * | data_out ) |
RTC 15 read single register function.
This function reads a single byte from the selected register.
| [in] | ctx | : Click context object. See rtc15_t object definition for detailed explanation. |
| [in] | reg | : Register address. |
| [out] | data_out | : Pointer to the memory to store the read byte. |
0 - Success, -1 - Error. | err_t rtc15_read_regs | ( | rtc15_t * | ctx, |
| uint8_t | reg, | ||
| uint8_t * | data_out, | ||
| uint8_t | len ) |
RTC 15 read multiple registers function.
This function reads a sequence of bytes starting from the selected register.
| [in] | ctx | : Click context object. See rtc15_t object definition for detailed explanation. |
| [in] | reg | : Start register address. |
| [out] | data_out | : Pointer to the buffer to store read data. |
| [in] | len | : Number of bytes to read. |
0 - Success, -1 - Error. | err_t rtc15_read_time | ( | rtc15_t * | ctx, |
| rtc15_time_t * | time ) |
RTC 15 read time function.
This function reads the current time (hours, minutes, seconds) from the RTC.
| [in] | ctx | : Click context object. See rtc15_t object definition for detailed explanation. |
| [out] | time | : Pointer to the time structure to store the read values. See rtc15_time_t object definition for structure fields. |
0 - Success, -1 - Error. | err_t rtc15_set_date | ( | rtc15_t * | ctx, |
| rtc15_date_t * | date ) |
RTC 15 set date function.
This function sets the current date (day, day of week, month, year) in the RTC.
| [in] | ctx | : Click context object. See rtc15_t object definition for detailed explanation. |
| [in] | date | : Pointer to the date structure. See rtc15_date_t object definition for structure fields. |
0 - Success, -1 - Error. | err_t rtc15_set_time | ( | rtc15_t * | ctx, |
| rtc15_time_t * | time ) |
RTC 15 set time function.
This function sets the current time (hours, minutes, seconds) in the RTC.
| [in] | ctx | : Click context object. See rtc15_t object definition for detailed explanation. |
| [in] | time | : Pointer to the time structure. See rtc15_time_t object definition for structure fields. |
0 - Success, -1 - Error. | err_t rtc15_write_reg | ( | rtc15_t * | ctx, |
| uint8_t | reg, | ||
| uint8_t | data_in ) |
RTC 15 write single register function.
This function writes a single byte to the selected register.
| [in] | ctx | : Click context object. See rtc15_t object definition for detailed explanation. |
| [in] | reg | : Register address. |
| [in] | data_in | : Data byte to write. |
0 - Success, -1 - Error. | err_t rtc15_write_regs | ( | rtc15_t * | ctx, |
| uint8_t | reg, | ||
| uint8_t * | data_in, | ||
| uint8_t | len ) |
RTC 15 write multiple registers function.
This function writes a sequence of bytes starting from the selected register.
| [in] | ctx | : Click context object. See rtc15_t object definition for detailed explanation. |
| [in] | reg | : Start register address. |
| [in] | data_in | : Pointer to the data to be written. |
| [in] | len | : Number of bytes to write. |
0 - Success, -1 - Error.