rtc12 2.0.0.0
|
API for configuring and manipulating RTC 12 Click driver. More...
Modules | |
RTC 12 Registers List | |
List of registers of RTC 12 Click driver. | |
RTC 12 Registers Settings | |
Settings for registers of RTC 12 Click driver. | |
RTC 12 MikroBUS Map | |
MikroBUS pin mapping of RTC 12 Click driver. | |
Functions | |
void | rtc12_cfg_setup (rtc12_cfg_t *cfg) |
RTC 12 configuration object setup function. More... | |
err_t | rtc12_init (rtc12_t *ctx, rtc12_cfg_t *cfg) |
RTC 12 initialization function. More... | |
err_t | rtc12_default_cfg (rtc12_t *ctx) |
RTC 12 default configuration function. More... | |
err_t | rtc12_generic_write (rtc12_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
RTC 12 data writing function. More... | |
err_t | rtc12_generic_read (rtc12_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
RTC 12 data reading function. More... | |
err_t | rtc12_set_ctrl_reg (rtc12_t *ctx, rtc12_control_t rtc_ctrl) |
RTC 12 set control register function. More... | |
err_t | rtc12_get_ctrl_reg (rtc12_t *ctx, rtc12_control_t *rtc_ctrl) |
RTC 12 get control register function. More... | |
err_t | rtc12_get_time (rtc12_t *ctx, rtc12_time_t *rtc_time) |
RTC 12 get time function. More... | |
err_t | rtc12_set_time (rtc12_t *ctx, rtc12_time_t rtc_time) |
RTC 12 set time function. More... | |
err_t | rtc12_get_date (rtc12_t *ctx, rtc12_date_t *rtc_date) |
RTC 12 get date function. More... | |
err_t | rtc12_set_date (rtc12_t *ctx, rtc12_date_t rtc_date) |
RTC 12 get time function. More... | |
err_t | rtc12_get_alarm_0 (rtc12_t *ctx, rtc12_alarm_t *rtc_alarm) |
RTC 12 get alarm 0 function. More... | |
err_t | rtc12_set_alarm_0 (rtc12_t *ctx, rtc12_alarm_t rtc_alarm) |
RTC 12 get alarm 0 function. More... | |
err_t | rtc12_get_alarm_1 (rtc12_t *ctx, rtc12_alarm_t *rtc_alarm) |
RTC 12 get alarm 1 function. More... | |
err_t | rtc12_set_alarm_1 (rtc12_t *ctx, rtc12_alarm_t rtc_alarm) |
RTC 12 get alarm 1 function. More... | |
uint8_t | rtc12_check_int (rtc12_t *ctx) |
RTC 12 check interrupt state function. More... | |
uint8_t | rtc12_check_power_fail (rtc12_t *ctx) |
RTC 12 check power fail state function. More... | |
API for configuring and manipulating RTC 12 Click driver.
void rtc12_cfg_setup | ( | rtc12_cfg_t * | cfg | ) |
RTC 12 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See rtc12_cfg_t object definition for detailed explanation. |
uint8_t rtc12_check_int | ( | rtc12_t * | ctx | ) |
RTC 12 check interrupt state function.
This function check the interrupt state of the DS1343 Low-Current SPI/3-Wire RTCs on the RTC 12 click board™.
[in] | ctx | : Click context object. See rtc12_t object definition for detailed explanation. |
0
- INT pin state low, 1
- INT pin state high.uint8_t rtc12_check_power_fail | ( | rtc12_t * | ctx | ) |
RTC 12 check power fail state function.
This function check the power fail state of the DS1343 Low-Current SPI/3-Wire RTCs on the RTC 12 click board™.
[in] | ctx | : Click context object. See rtc12_t object definition for detailed explanation. |
0
- PF pin state low, 1
- PF pin state high.err_t rtc12_default_cfg | ( | rtc12_t * | ctx | ) |
RTC 12 default configuration function.
This function executes a default configuration of RTC 12 click board.
[in] | ctx | : Click context object. See rtc12_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t rtc12_generic_read | ( | rtc12_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
RTC 12 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 rtc12_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 rtc12_generic_write | ( | rtc12_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
RTC 12 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 rtc12_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 rtc12_get_alarm_0 | ( | rtc12_t * | ctx, |
rtc12_alarm_t * | rtc_alarm | ||
) |
RTC 12 get alarm 0 function.
This function get RTC alarm 0 structure of the DS1343 Low-Current SPI/3-Wire RTCs on the RTC 12 click board™.
[in] | ctx | : Click context object. See rtc12_t object definition for detailed explanation. |
[out] | rtc_alarm | : Pointer of the RTC alarm 0 structure. |
0
- Success, -1
- Error.err_t rtc12_get_alarm_1 | ( | rtc12_t * | ctx, |
rtc12_alarm_t * | rtc_alarm | ||
) |
RTC 12 get alarm 1 function.
This function get RTC alarm 1 structure of the DS1343 Low-Current SPI/3-Wire RTCs on the RTC 12 click board™.
[in] | ctx | : Click context object. See rtc12_t object definition for detailed explanation. |
[out] | rtc_alarm | : Pointer of the RTC alarm 1 structure. |
0
- Success, -1
- Error.err_t rtc12_get_ctrl_reg | ( | rtc12_t * | ctx, |
rtc12_control_t * | rtc_ctrl | ||
) |
RTC 12 get control register function.
This function get a control register data of the DS1343 Low-Current SPI/3-Wire RTCs on the RTC 12 click board™.
[in] | ctx | : Click context object. See rtc12_t object definition for detailed explanation. |
[out] | rtc_ctrl | : RTC control structure. |
0
- Success, -1
- Error.err_t rtc12_get_date | ( | rtc12_t * | ctx, |
rtc12_date_t * | rtc_date | ||
) |
RTC 12 get date function.
This function get RTC data structure of the DS1343 Low-Current SPI/3-Wire RTCs on the RTC 12 click board™.
[in] | ctx | : Click context object. See rtc12_t object definition for detailed explanation. |
[out] | rtc_date | : Pointer of the RTC date structure. |
0
- Success, -1
- Error.err_t rtc12_get_time | ( | rtc12_t * | ctx, |
rtc12_time_t * | rtc_time | ||
) |
RTC 12 get time function.
This function get RTC time data structure of the DS1343 Low-Current SPI/3-Wire RTCs on the RTC 12 click board™.
[in] | ctx | : Click context object. See rtc12_t object definition for detailed explanation. |
[out] | rtc_time | : Pointer of the RTC time structure. |
0
- Success, -1
- Error.err_t rtc12_init | ( | rtc12_t * | ctx, |
rtc12_cfg_t * | cfg | ||
) |
RTC 12 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See rtc12_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See rtc12_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t rtc12_set_alarm_0 | ( | rtc12_t * | ctx, |
rtc12_alarm_t | rtc_alarm | ||
) |
RTC 12 get alarm 0 function.
This function get RTC alarm 0 data structure of the DS1343 Low-Current SPI/3-Wire RTCs on the RTC 12 click board™.
[in] | ctx | : Click context object. See rtc12_t object definition for detailed explanation. |
[in] | rtc_alarm | : RTC alarm 0 structure. |
0
- Success, -1
- Error.err_t rtc12_set_alarm_1 | ( | rtc12_t * | ctx, |
rtc12_alarm_t | rtc_alarm | ||
) |
RTC 12 get alarm 1 function.
This function get RTC alarm 1 data structure of the DS1343 Low-Current SPI/3-Wire RTCs on the RTC 12 click board™.
[in] | ctx | : Click context object. See rtc12_t object definition for detailed explanation. |
[in] | rtc_alarm | : RTC alarm 1 structure. |
0
- Success, -1
- Error.err_t rtc12_set_ctrl_reg | ( | rtc12_t * | ctx, |
rtc12_control_t | rtc_ctrl | ||
) |
RTC 12 set control register function.
This function sets a control register of the DS1343 Low-Current SPI/3-Wire RTCs on the RTC 12 click board™.
[in] | ctx | : Click context object. See rtc12_t object definition for detailed explanation. |
[in] | rtc_ctrl | : RTC control structure. |
0
- Success, -1
- Error.err_t rtc12_set_date | ( | rtc12_t * | ctx, |
rtc12_date_t | rtc_date | ||
) |
RTC 12 get time function.
This function get RTC time data structure of the DS1343 Low-Current SPI/3-Wire RTCs on the RTC 12 click board™.
[in] | ctx | : Click context object. See rtc12_t object definition for detailed explanation. |
[in] | rtc_date | : RTC date structure. |
0
- Success, -1
- Error.err_t rtc12_set_time | ( | rtc12_t * | ctx, |
rtc12_time_t | rtc_time | ||
) |
RTC 12 set time function.
This function set RTC time data structure of the DS1343 Low-Current SPI/3-Wire RTCs on the RTC 12 click board™.
[in] | ctx | : Click context object. See rtc12_t object definition for detailed explanation. |
[in] | rtc_time | : RTC time structure. |
0
- Success, -1
- Error.