i2cisolator6 2.1.0.0
|
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. | |
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.
void i2cisolator6_cfg_setup | ( | i2cisolator6_cfg_t * | cfg | ) |
I2C Isolator 6 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See i2cisolator6_cfg_t object definition for detailed explanation. |
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.
[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. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. 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.
[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. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. 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.
[in] | ctx | : Click context object. See i2cisolator6_t object definition for detailed explanation. |
[in] | slave_address | Specified I2C slave address. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. 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.
[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. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. 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.
[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_data | Number of bytes to be read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.