rtc13 2.0.0.0
|
API for configuring and manipulating RTC 13 Click driver. More...
Topics | |
RTC 13 Registers List | |
List of registers of RTC 13 Click driver. | |
RTC 13 Registers Settings | |
Settings for registers of RTC 13 Click driver. | |
RTC 13 MikroBUS Map | |
MikroBUS pin mapping of RTC 13 Click driver. | |
Functions | |
void | rtc13_cfg_setup (rtc13_cfg_t *cfg) |
RTC 13 configuration object setup function. | |
err_t | rtc13_init (rtc13_t *ctx, rtc13_cfg_t *cfg) |
RTC 13 initialization function. | |
err_t | rtc13_default_cfg (rtc13_t *ctx) |
RTC 13 default configuration function. | |
uint8_t | rtc13_get_interrupt (rtc13_t *ctx) |
RTC 13 get interrupt function. | |
err_t | rtc13_block_clkout (rtc13_t *ctx, uint8_t en_clkout) |
RTC 13 block CLKOUT function. | |
err_t | rtc13_generic_write (rtc13_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
RTC 13 data writing function. | |
err_t | rtc13_generic_read (rtc13_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
RTC 13 data reading function. | |
err_t | rtc13_soft_reset (rtc13_t *ctx) |
RTC 13 soft reset function. | |
err_t | rtc13_get_time (rtc13_t *ctx, rtc13_time_t *rtc_time) |
RTC 13 get time function. | |
err_t | rtc13_set_time (rtc13_t *ctx, rtc13_time_t rtc_time) |
RTC 13 set time function. | |
err_t | rtc13_get_date (rtc13_t *ctx, rtc13_date_t *rtc_date) |
RTC 13 get date function. | |
err_t | rtc13_set_date (rtc13_t *ctx, rtc13_date_t rtc_date) |
RTC 13 set date function. | |
err_t | rtc13_get_alarm (rtc13_t *ctx, rtc13_alarm_t *rtc_alarm) |
RTC 13 get alarm function. | |
err_t | rtc13_set_alarm (rtc13_t *ctx, rtc13_alarm_t rtc_alarm) |
RTC 13 set alarm function. | |
API for configuring and manipulating RTC 13 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
err_t rtc13_block_clkout | ( | rtc13_t * | ctx, |
uint8_t | en_clkout ) |
RTC 13 block CLKOUT function.
This function enable/disable block CLKOUT of the PCF2123 SPI Real time clock/calendar on the RTC 13 click board™.
[in] | ctx | : Click context object. See rtc13_t object definition for detailed explanation. |
[in] | en_clkout | :
|
0
- Success, -1
- Error.void rtc13_cfg_setup | ( | rtc13_cfg_t * | cfg | ) |
RTC 13 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See rtc13_cfg_t object definition for detailed explanation. |
err_t rtc13_default_cfg | ( | rtc13_t * | ctx | ) |
RTC 13 default configuration function.
This function executes a default configuration of RTC 13 click board.
[in] | ctx | : Click context object. See rtc13_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t rtc13_generic_read | ( | rtc13_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
RTC 13 data reading function.
This function reads a desired number of data bytes starting from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See rtc13_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.err_t rtc13_generic_write | ( | rtc13_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
RTC 13 data writing function.
This function writes a desired number of data bytes starting from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See rtc13_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.err_t rtc13_get_alarm | ( | rtc13_t * | ctx, |
rtc13_alarm_t * | rtc_alarm ) |
RTC 13 get alarm function.
This function get RTC alarm data structure of the PCF2123 SPI Real time clock/calendar on the RTC 13 click board™.
[in] | ctx | : Click context object. See rtc13_t object definition for detailed explanation. |
[out] | rtc_alarm | : Pointer of the RTC alarm data structure. |
0
- Success, -1
- Error.err_t rtc13_get_date | ( | rtc13_t * | ctx, |
rtc13_date_t * | rtc_date ) |
RTC 13 get date function.
This function get RTC date data structure of the PCF2123 SPI Real time clock/calendar on the RTC 13 click board™.
[in] | ctx | : Click context object. See rtc13_t object definition for detailed explanation. |
[out] | rtc_date | : Pointer of the RTC date data structure. |
0
- Success, -1
- Error.uint8_t rtc13_get_interrupt | ( | rtc13_t * | ctx | ) |
RTC 13 get interrupt function.
This function check the interrupt state of the PCF2123 SPI Real time clock/calendar on the RTC 13 click board™.
[in] | ctx | : Click context object. See rtc13_t object definition for detailed explanation. |
0
- INT pin state low,, 1
- INT pin state high.err_t rtc13_get_time | ( | rtc13_t * | ctx, |
rtc13_time_t * | rtc_time ) |
RTC 13 get time function.
This function get RTC time data structure of the PCF2123 SPI Real time clock/calendar on the RTC 13 click board™.
[in] | ctx | : Click context object. See rtc13_t object definition for detailed explanation. |
[out] | rtc_time | : Pointer of the RTC time structure. |
0
- Success, -1
- Error.err_t rtc13_init | ( | rtc13_t * | ctx, |
rtc13_cfg_t * | cfg ) |
RTC 13 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See rtc13_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See rtc13_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t rtc13_set_alarm | ( | rtc13_t * | ctx, |
rtc13_alarm_t | rtc_alarm ) |
RTC 13 set alarm function.
This function set RTC alarm data structure of the PCF2123 SPI Real time clock/calendar on the RTC 13 click board™.
[in] | ctx | : Click context object. See rtc13_t object definition for detailed explanation. |
[in] | rtc_alarm | : RTC alarm structure. |
0
- Success, -1
- Error.err_t rtc13_set_date | ( | rtc13_t * | ctx, |
rtc13_date_t | rtc_date ) |
RTC 13 set date function.
This function set RTC date data structure of the PCF2123 SPI Real time clock/calendar on the RTC 13 click board™.
[in] | ctx | : Click context object. See rtc13_t object definition for detailed explanation. |
[in] | rtc_date | : RTC date structure. |
0
- Success, -1
- Error.err_t rtc13_set_time | ( | rtc13_t * | ctx, |
rtc13_time_t | rtc_time ) |
RTC 13 set time function.
This function set RTC time data structure of the PCF2123 SPI Real time clock/calendar on the RTC 13 click board™.
[in] | ctx | : Click context object. See rtc13_t object definition for detailed explanation. |
[in] | rtc_time | : RTC time structure. |
0
- Success, -1
- Error.err_t rtc13_soft_reset | ( | rtc13_t * | ctx | ) |
RTC 13 soft reset function.
This function performs a software reset of the PCF2123 SPI Real time clock/calendar on the RTC 13 click board™.
[in] | ctx | : Click context object. See rtc13_t object definition for detailed explanation. |
0
- Success, -1
- Error.