i2cisolator4 2.0.0.0
I2C Isolator 4 Click Driver

API for configuring and manipulating I2C Isolator 4 Click driver. More...

Topics

 I2C Isolator 4 Registers List
 List of registers of I2C Isolator 4 Click driver.
 
 I2C Isolator 4 Registers Settings
 Settings for registers of I2C Isolator 4 Click driver.
 
 I2C Isolator 4 MikroBUS Map
 MikroBUS pin mapping of I2C Isolator 4 Click driver.
 

Functions

void i2cisolator4_cfg_setup (i2cisolator4_cfg_t *cfg)
 I2C Isolator 4 configuration object setup function.
 
err_t i2cisolator4_init (i2cisolator4_t *ctx, i2cisolator4_cfg_t *cfg)
 I2C Isolator 4 initialization function.
 
err_t i2cisolator4_generic_write (i2cisolator4_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len)
 I2C Isolator 4 I2C writing function.
 
err_t i2cisolator4_generic_read (i2cisolator4_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len)
 I2C Isolator 4 I2C reading function.
 
err_t i2cisolator4_set_slave_address (i2cisolator4_t *ctx, uint8_t address)
 I2C Isolator 4 set I2C Slave address function.
 

Detailed Description

API for configuring and manipulating I2C Isolator 4 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

◆ i2cisolator4_cfg_setup()

void i2cisolator4_cfg_setup ( i2cisolator4_cfg_t * cfg)

I2C Isolator 4 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ i2cisolator4_generic_read()

err_t i2cisolator4_generic_read ( i2cisolator4_t * ctx,
uint8_t reg,
uint8_t * rx_buf,
uint8_t rx_len )

I2C Isolator 4 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 i2cisolator4_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.

◆ i2cisolator4_generic_write()

err_t i2cisolator4_generic_write ( i2cisolator4_t * ctx,
uint8_t reg,
uint8_t * tx_buf,
uint8_t tx_len )

I2C Isolator 4 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 i2cisolator4_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.

◆ i2cisolator4_init()

err_t i2cisolator4_init ( i2cisolator4_t * ctx,
i2cisolator4_cfg_t * cfg )

I2C Isolator 4 initialization function.

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

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

◆ i2cisolator4_set_slave_address()

err_t i2cisolator4_set_slave_address ( i2cisolator4_t * ctx,
uint8_t address )

I2C Isolator 4 set I2C Slave address function.

This function sets I2C address of the subordinate I2C device to address which is targeted by read and write operations.

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