rtc14 2.0.0.0
RTC 14 Click Driver

API for configuring and manipulating RTC 14 Click driver. More...

Topics

 RTC 14 Registers List
 List of registers of RTC 14 Click driver.
 
 RTC 14 Registers Settings
 Settings for registers of RTC 14 Click driver.
 
 RTC 14 MikroBUS Map
 MikroBUS pin mapping of RTC 14 Click driver.
 

Functions

void rtc14_cfg_setup (rtc14_cfg_t *cfg)
 RTC 14 configuration object setup function.
 
err_t rtc14_init (rtc14_t *ctx, rtc14_cfg_t *cfg)
 RTC 14 initialization function.
 
err_t rtc14_default_cfg (rtc14_t *ctx)
 RTC 14 default configuration function.
 
err_t rtc14_generic_write (rtc14_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len)
 RTC 14 I2C writing function.
 
err_t rtc14_generic_read (rtc14_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len)
 RTC 14 I2C reading function.
 
err_t rtc14_write_sram (rtc14_t *ctx, uint16_t sram_data_in)
 RTC 14 write SRAM function.
 
err_t rtc14_read_sram (rtc14_t *ctx, uint16_t *sram_data_out)
 RTC 14 I2C reading SRAM function.
 
uint8_t rtc14_get_interrupt (rtc14_t *ctx)
 RTC 14 get interrupt function.
 
uint8_t rtc14_get_fout (rtc14_t *ctx)
 RTC 14 get fout function.
 
err_t rtc14_enable_rtc (rtc14_t *ctx)
 RTC 14 enable RTC function.
 
err_t rtc14_soft_reset (rtc14_t *ctx)
 RTC 14 soft reset function.
 
err_t rtc14_get_time (rtc14_t *ctx, rtc14_time_t *rtc_time)
 RTC 14 get time function.
 
err_t rtc14_set_time (rtc14_t *ctx, rtc14_time_t rtc_time)
 RTC 14 set time function.
 
err_t rtc14_get_date (rtc14_t *ctx, rtc14_date_t *rtc_date)
 RTC 14 get date function.
 
err_t rtc14_set_date (rtc14_t *ctx, rtc14_date_t rtc_date)
 RTC 14 set date function.
 
err_t rtc14_get_alarm (rtc14_t *ctx, rtc14_alarm_t *rtc_alarm)
 RTC 14 get alarm function.
 
err_t rtc14_set_alarm (rtc14_t *ctx, rtc14_alarm_t rtc_alarm)
 RTC 14 set alarm function.
 
void rtc14_trigger_time_stamp (rtc14_t *ctx)
 RTC 14 trigger time stamp function.
 
err_t rtc14_get_time_stamp (rtc14_t *ctx, rtc14_time_stamp_t *rtc_time_stamp)
 RTC 14 get time stamp function.
 

Detailed Description

API for configuring and manipulating RTC 14 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ rtc14_cfg_setup()

void rtc14_cfg_setup ( rtc14_cfg_t * cfg)

RTC 14 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See rtc14_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ rtc14_default_cfg()

err_t rtc14_default_cfg ( rtc14_t * ctx)

RTC 14 default configuration function.

This function executes a default configuration of RTC 14 click board.

Parameters
[in]ctx: Click context object. See rtc14_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ rtc14_enable_rtc()

err_t rtc14_enable_rtc ( rtc14_t * ctx)

RTC 14 enable RTC function.

This function enable the RTC, crystal oscillator of the ISL1221 Low Power RTC with Battery Backed SRAM and Event Detection on the RTC 14 click board™.

Parameters
[in]ctx: Click context object. See rtc14_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ rtc14_generic_read()

err_t rtc14_generic_read ( rtc14_t * ctx,
uint8_t reg,
uint8_t * rx_buf,
uint8_t rx_len )

RTC 14 I2C reading function.

This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See rtc14_t object definition for detailed explanation.
[in]reg: Start register address.
[out]rx_buf: Output read data.
[in]rx_len: Number of bytes to be read.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ rtc14_generic_write()

err_t rtc14_generic_write ( rtc14_t * ctx,
uint8_t reg,
uint8_t * tx_buf,
uint8_t tx_len )

RTC 14 I2C writing function.

This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See rtc14_t object definition for detailed explanation.
[in]reg: Start register address.
[in]tx_buf: Data to be written.
[in]tx_len: Number of bytes to be written.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ rtc14_get_alarm()

err_t rtc14_get_alarm ( rtc14_t * ctx,
rtc14_alarm_t * rtc_alarm )

RTC 14 get alarm function.

This function function get RTC alarm data structure of the ISL1221 Low Power RTC with Battery Backed SRAM and Event Detection on the RTC 14 click board™.

Parameters
[in]ctx: Click context object. See rtc14_t object definition for detailed explanation.
[out]rtc_alarm: Pointer of the RTC alarm structure.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ rtc14_get_date()

err_t rtc14_get_date ( rtc14_t * ctx,
rtc14_date_t * rtc_date )

RTC 14 get date function.

This function function get RTC date data structure of the ISL1221 Low Power RTC with Battery Backed SRAM and Event Detection on the RTC 14 click board™.

Parameters
[in]ctx: Click context object. See rtc14_t object definition for detailed explanation.
[out]rtc_date: Pointer of the RTC date structure.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ rtc14_get_fout()

uint8_t rtc14_get_fout ( rtc14_t * ctx)

RTC 14 get fout function.

This function get frequency output pin state of the ISL1221 Low Power RTC with Battery Backed SRAM and Event Detection on the RTC 14 click board™.

Parameters
[in]ctx: Click context object. See rtc14_t object definition for detailed explanation.
Returns
  • 0 - FO pin state low,,
  • 1 - FO pin state high.
Note
None.

◆ rtc14_get_interrupt()

uint8_t rtc14_get_interrupt ( rtc14_t * ctx)

RTC 14 get interrupt function.

This function check the interrupt state of the ISL1221 Low Power RTC with Battery Backed SRAM and Event Detection on the RTC 14 click board™.

Parameters
[in]ctx: Click context object. See rtc14_t object definition for detailed explanation.
Returns
  • 0 - INT pin state low,,
  • 1 - INT pin state high.
Note
None.

◆ rtc14_get_time()

err_t rtc14_get_time ( rtc14_t * ctx,
rtc14_time_t * rtc_time )

RTC 14 get time function.

This function function get RTC time data structure of the ISL1221 Low Power RTC with Battery Backed SRAM and Event Detection on the RTC 14 click board™.

Parameters
[in]ctx: Click context object. See rtc14_t object definition for detailed explanation.
[out]rtc_time: Pointer of the RTC time structure.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ rtc14_get_time_stamp()

err_t rtc14_get_time_stamp ( rtc14_t * ctx,
rtc14_time_stamp_t * rtc_time_stamp )

RTC 14 get time stamp function.

This function function get RTC time stamp data structure of the ISL1221 Low Power RTC with Battery Backed SRAM and Event Detection on the RTC 14 click board™.

Parameters
[in]ctx: Click context object. See rtc14_t object definition for detailed explanation.
[out]rtc_time_stamp: Pointer of the RTC time stamp structure.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ rtc14_init()

err_t rtc14_init ( rtc14_t * ctx,
rtc14_cfg_t * cfg )

RTC 14 initialization function.

This function initializes all necessary pins and peripherals used for this click board.

Parameters
[out]ctx: Click context object. See rtc14_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See rtc14_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ rtc14_read_sram()

err_t rtc14_read_sram ( rtc14_t * ctx,
uint16_t * sram_data_out )

RTC 14 I2C reading SRAM function.

This function reads a user SRAM memory of the ISL1221 Low Power RTC with Battery Backed SRAM and Event Detection on the RTC 14 click board™.

Parameters
[in]ctx: Click context object. See rtc14_t object definition for detailed explanation.
[out]sram_data_out: Output read data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ rtc14_set_alarm()

err_t rtc14_set_alarm ( rtc14_t * ctx,
rtc14_alarm_t rtc_alarm )

RTC 14 set alarm function.

This function function set RTC alarm data structure of the ISL1221 Low Power RTC with Battery Backed SRAM and Event Detection on the RTC 14 click board™.

Parameters
[in]ctx: Click context object. See rtc14_t object definition for detailed explanation.
[in]rtc_alarm: Pointer of the RTC alarm structure.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ rtc14_set_date()

err_t rtc14_set_date ( rtc14_t * ctx,
rtc14_date_t rtc_date )

RTC 14 set date function.

This function function set RTC date data structure of the ISL1221 Low Power RTC with Battery Backed SRAM and Event Detection on the RTC 14 click board™.

Parameters
[in]ctx: Click context object. See rtc14_t object definition for detailed explanation.
[in]rtc_date: Pointer of the RTC date structure.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ rtc14_set_time()

err_t rtc14_set_time ( rtc14_t * ctx,
rtc14_time_t rtc_time )

RTC 14 set time function.

This function function set RTC time data structure of the ISL1221 Low Power RTC with Battery Backed SRAM and Event Detection on the RTC 14 click board™.

Parameters
[in]ctx: Click context object. See rtc14_t object definition for detailed explanation.
[in]rtc_time: Pointer of the RTC time structure.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ rtc14_soft_reset()

err_t rtc14_soft_reset ( rtc14_t * ctx)

RTC 14 soft reset function.

This function performs a software reset of the ISL1221 Low Power RTC with Battery Backed SRAM and Event Detection on the RTC 14 click board™.

Parameters
[in]ctx: Click context object. See rtc14_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ rtc14_trigger_time_stamp()

void rtc14_trigger_time_stamp ( rtc14_t * ctx)

RTC 14 trigger time stamp function.

This function function trigger time stamp ( EIN pin is triggered ) of the ISL1221 Low Power RTC with Battery Backed SRAM and Event Detection on the RTC 14 click board™.

Parameters
[in]ctx: Click context object. See rtc14_t object definition for detailed explanation.
Returns
Nothing.
Note
None.

◆ rtc14_write_sram()

err_t rtc14_write_sram ( rtc14_t * ctx,
uint16_t sram_data_in )

RTC 14 write SRAM function.

This function writes a user SRAM memory of the ISL1221 Low Power RTC with Battery Backed SRAM and Event Detection on the RTC 14 click board™.

Parameters
[in]ctx: Click context object. See rtc14_t object definition for detailed explanation.
[in]sram_data_in: Data to be written.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.