i2cisolator6 2.1.0.0
I2C Isolator 6 Click Driver

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

Topics

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

Functions

void i2cisolator6_cfg_setup (i2cisolator6_cfg_t *cfg)
 I2C Isolator 6 configuration object setup function.
 
err_t i2cisolator6_init (i2cisolator6_t *ctx, i2cisolator6_cfg_t *cfg)
 I2C Isolator 6 initialization function.
 
err_t i2cisolator6_write (i2cisolator6_t *ctx, uint8_t *data_in, uint8_t len)
 I2C Isolator 6 I2C writing function.
 
err_t i2cisolator6_read (i2cisolator6_t *ctx, uint8_t *data_out, uint8_t len)
 I2C Isolator 6 I2C reading function.
 
err_t i2cisolator6_write_then_read (i2cisolator6_t *ctx, uint8_t *data_in, uint8_t len_write_data, uint8_t *data_out, uint8_t len_read_data)
 I2C Isolator 6 I2C write then read function.
 
err_t i2cisolator6_set_slave_address (i2cisolator6_t *ctx, uint8_t slave_address)
 I2C Isolator 6 set I2C Slave address function.
 

Detailed Description

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

◆ i2cisolator6_cfg_setup()

void i2cisolator6_cfg_setup ( i2cisolator6_cfg_t * cfg)

I2C Isolator 6 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ i2cisolator6_init()

err_t i2cisolator6_init ( i2cisolator6_t * ctx,
i2cisolator6_cfg_t * cfg )

I2C Isolator 6 initialization function.

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

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

◆ i2cisolator6_read()

err_t i2cisolator6_read ( i2cisolator6_t * ctx,
uint8_t * data_out,
uint8_t len )

I2C Isolator 6 I2C reading function.

Function shall generate a START signal, followed by len number of reads from the bus placing the data in data_out . Ends with a STOP signal.

Parameters
[in]ctx: Click context object. See i2cisolator6_t object definition for detailed explanation.
[out]data_out: Output read data.
[in]len: Number of bytes to be read.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ i2cisolator6_set_slave_address()

err_t i2cisolator6_set_slave_address ( i2cisolator6_t * ctx,
uint8_t slave_address )

I2C Isolator 6 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 i2cisolator6_t object definition for detailed explanation.
[in]slave_addressSpecified I2C slave address.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
It is recommended to check return value for error.

◆ i2cisolator6_write()

err_t i2cisolator6_write ( i2cisolator6_t * ctx,
uint8_t * data_in,
uint8_t len )

I2C Isolator 6 I2C writing function.

Function shall generate a START signal, followed by len number of writes from data_in on the bus.

Parameters
[in]ctx: Click context object. See i2cisolator6_t object definition for detailed explanation.
[in]data_in: Data to be written.
[in]len: Number of bytes to be written.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ i2cisolator6_write_then_read()

err_t i2cisolator6_write_then_read ( i2cisolator6_t * ctx,
uint8_t * data_in,
uint8_t len_write_data,
uint8_t * data_out,
uint8_t len_read_data )

I2C Isolator 6 I2C write then read function.

Function performs a write operation followed by a read operation on the bus. The operation consists of a start signal followed by len_write_data number of write operations ( data from data_in ), a restart signal followed by len_read_data number of read operations ( placed in data_out ), finishing the operation with a stop signal.

Parameters
[in]ctx: Click context object. See i2cisolator6_t object definition for detailed explanation.
[in]data_in: Data to be written.
[in]len_write_data: Number of bytes to be written.
[out]data_out: Output read data.
[in]len_read_dataNumber of bytes to be read.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.