rtc20
2.1.0.0
|
API for configuring and manipulating RTC 20 Click driver. More...
Modules | |
RTC 20 Registers List | |
List of registers of RTC 20 Click driver. | |
RTC 20 Registers Settings | |
Settings for registers of RTC 20 Click driver. | |
RTC 20 MikroBUS Map | |
MikroBUS pin mapping of RTC 20 Click driver. | |
Functions | |
void | rtc20_cfg_setup (rtc20_cfg_t *cfg) |
RTC 20 configuration object setup function. More... | |
err_t | rtc20_init (rtc20_t *ctx, rtc20_cfg_t *cfg) |
RTC 20 initialization function. More... | |
err_t | rtc20_generic_write (rtc20_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
RTC 20 I2C writing function. More... | |
err_t | rtc20_generic_read (rtc20_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
RTC 20 I2C reading function. More... | |
void | rtc20_wdi_pin_state (rtc20_t *ctx, uint8_t pin_state) |
RTC 20 I2C reading function. More... | |
void | rtc20_ext_pin_state (rtc20_t *ctx, uint8_t pin_state) |
RTC 20 I2C reading function. More... | |
err_t | rtc20_set_time (rtc20_t *ctx, rtc20_time_t rtc_time) |
RTC 20 set time function. More... | |
err_t | rtc20_get_time (rtc20_t *ctx, rtc20_time_t *rtc_time) |
RTC 20 get time function. More... | |
err_t | rtc20_set_date (rtc20_t *ctx, rtc20_date_t rtc_date) |
RTC 20 set date function. More... | |
err_t | rtc20_get_date (rtc20_t *ctx, rtc20_date_t *rtc_date) |
RTC 20 get date function. More... | |
err_t | rtc20_set_alarm (rtc20_t *ctx, rtc20_time_t rtc_alarm_time, rtc20_date_t rtc_alarm_date) |
RTC 20 set alarm function. More... | |
err_t | rtc20_get_alarm (rtc20_t *ctx, rtc20_time_t *rtc_alarm_time, rtc20_date_t *rtc_alarm_date) |
RTC 20 get alarm function. More... | |
err_t | rtc20_get_status (rtc20_t *ctx, uint8_t *status) |
RTC 20 get status function. More... | |
err_t | rtc20_set_ctrl_signals (rtc20_t *ctx, rtc20_ctrl_signals_t ctrl_signals) |
RTC 20 set ctrl signals function. More... | |
err_t | rtc20_get_ctrl_signals (rtc20_t *ctx, rtc20_ctrl_signals_t *ctrl_signals) |
RTC 20 get ctrl signals function. More... | |
uint8_t | rtc20_get_ir1_pin (rtc20_t *ctx) |
RTC 20 get IR1 pin function. More... | |
uint8_t | rtc20_get_ir2_pin (rtc20_t *ctx) |
RTC 20 get IR2 pin function. More... | |
API for configuring and manipulating RTC 20 Click driver.
void rtc20_cfg_setup | ( | rtc20_cfg_t * | cfg | ) |
RTC 20 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See rtc20_cfg_t object definition for detailed explanation. |
void rtc20_ext_pin_state | ( | rtc20_t * | ctx, |
uint8_t | pin_state | ||
) |
RTC 20 I2C reading function.
This function sets the EXT pin logic state of the AB08X5 Real-Time Clock on the RTC 20 Click board™.
[in] | ctx | : Click context object. See rtc20_t object definition for detailed explanation. |
[in] | pin_state | : EXT pin logic state. |
err_t rtc20_generic_read | ( | rtc20_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
RTC 20 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 rtc20_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 rtc20_generic_write | ( | rtc20_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
RTC 20 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 rtc20_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. err_t rtc20_get_alarm | ( | rtc20_t * | ctx, |
rtc20_time_t * | rtc_alarm_time, | ||
rtc20_date_t * | rtc_alarm_date | ||
) |
RTC 20 get alarm function.
This function reads the current RTC alarm time and date data
of the AB08X5 Real-Time Clock on the RTC 20 Click board™.
[in] | ctx | : Click context object. See rtc20_t object definition for detailed explanation. |
[out] | rtc_alarm_time | : RTC time object structure. |
[out] | rtc_alarm_date | : RTC date object structure. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc20_get_ctrl_signals | ( | rtc20_t * | ctx, |
rtc20_ctrl_signals_t * | ctrl_signals | ||
) |
RTC 20 get ctrl signals function.
This function reads the control signals data
of the AB08X5 Real-Time Clock on the RTC 20 Click board™.
[in] | ctx | : Click context object. See rtc20_t object definition for detailed explanation. |
[in] | ctrl_signals | : Cntrol signals object structure. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc20_get_date | ( | rtc20_t * | ctx, |
rtc20_date_t * | rtc_date | ||
) |
RTC 20 get date function.
This function reads the current RTC date data
of the AB08X5 Real-Time Clock on the RTC 20 Click board™.
[in] | ctx | : Click context object. See rtc20_t object definition for detailed explanation. |
[in] | rtc_date | : RTC date object structure. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t rtc20_get_ir1_pin | ( | rtc20_t * | ctx | ) |
RTC 20 get IR1 pin function.
This function get primary interrupt pin stste of the AB08X5 Real-Time Clock on the RTC 20 Click board™.
[in] | ctx | : Click context object. See rtc20_t object definition for detailed explanation. |
1
. FOUT/nIRQ can drive the value of the OUT bit. 2
. FOUT/nIRQ can drive the inverse of the combined interrupt signal IRQ (see Interrupts). 3
. FOUT/nIRQ can drive the square wave output (see 0x13 - SQW) if enabled by SQWE. 4
. FOUT/nIRQ can drive the inverse of the alarm interrupt signal AIRQ (see Interrupts). uint8_t rtc20_get_ir2_pin | ( | rtc20_t * | ctx | ) |
RTC 20 get IR2 pin function.
This function get secondary interrupt pin stste of the AB08X5 Real-Time Clock on the RTC 20 Click board™.
[in] | ctx | : Click context object. See rtc20_t object definition for detailed explanation. |
1
. nIRQ2 may be configured to generate several signals as a function of the OUT2S field (see 0x11 - Control2). nIRQ2 can drive the value of the OUTB bit. 2
. nIRQ2 can drive the square wave output (see 0x13 - SQW) if enabled by SQWE. 3
. nIRQ2 can drive the inverse of the combined interrupt signal IRQ(see Interrupts). 4
. nIRQ2 can drive the inverse of the alarm interrupt signal AIRQ(see Interrupts). 5
. nIRQ2 can drive either sense of the timer interrupt signal TIRQ. err_t rtc20_get_status | ( | rtc20_t * | ctx, |
uint8_t * | status | ||
) |
RTC 20 get status function.
This function reads the status data
of the AB08X5 Real-Time Clock on the RTC 20 Click board™.
[in] | ctx | : Click context object. See rtc20_t object definition for detailed explanation. |
[out] | status | : Status data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc20_get_time | ( | rtc20_t * | ctx, |
rtc20_time_t * | rtc_time | ||
) |
RTC 20 get time function.
This function reads the current RTC time data of the AB08X5 Real-Time Clock on the RTC 20 Click board™.
[in] | ctx | : Click context object. See rtc20_t object definition for detailed explanation. |
[out] | rtc_time | : RTC time object structure. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc20_init | ( | rtc20_t * | ctx, |
rtc20_cfg_t * | cfg | ||
) |
RTC 20 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See rtc20_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See rtc20_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc20_set_alarm | ( | rtc20_t * | ctx, |
rtc20_time_t | rtc_alarm_time, | ||
rtc20_date_t | rtc_alarm_date | ||
) |
RTC 20 set alarm function.
This function sets the desired RTC alarm time and date data
of the AB08X5 Real-Time Clock on the RTC 20 Click board™.
[in] | ctx | : Click context object. See rtc20_t object definition for detailed explanation. |
[in] | rtc_alarm_time | : RTC time object structure. |
[in] | rtc_alarm_date | : RTC date object structure. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc20_set_ctrl_signals | ( | rtc20_t * | ctx, |
rtc20_ctrl_signals_t | ctrl_signals | ||
) |
RTC 20 set ctrl signals function.
This function set the control signals data of the AB08X5 Real-Time Clock on the RTC 20 Click board™.
[in] | ctx | : Click context object. See rtc20_t object definition for detailed explanation. |
[in] | ctrl_signals | : Cntrol signals object structure. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc20_set_date | ( | rtc20_t * | ctx, |
rtc20_date_t | rtc_date | ||
) |
RTC 20 set date function.
This function sets the desired RTC date data
of the AB08X5 Real-Time Clock on the RTC 20 Click board™.
[in] | ctx | : Click context object. See rtc20_t object definition for detailed explanation. |
[in] | rtc_date | : RTC date object structure. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t rtc20_set_time | ( | rtc20_t * | ctx, |
rtc20_time_t | rtc_time | ||
) |
RTC 20 set time function.
This function sets the desired RTC time data
of the AB08X5 Real-Time Clock on the RTC 20 Click board™.
[in] | ctx | : Click context object. See rtc20_t object definition for detailed explanation. |
[in] | rtc_time | : RTC time object structure. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void rtc20_wdi_pin_state | ( | rtc20_t * | ctx, |
uint8_t | pin_state | ||
) |
RTC 20 I2C reading function.
This function sets the WDI pin logic state of the AB08X5 Real-Time Clock on the RTC 20 Click board™.
[in] | ctx | : Click context object. See rtc20_t object definition for detailed explanation. |
[in] | pin_state | : WDI pin logic state. |