i2cisolator4 2.0.0.0
|
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. | |
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.
void i2cisolator4_cfg_setup | ( | i2cisolator4_cfg_t * | cfg | ) |
I2C Isolator 4 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See i2cisolator4_cfg_t object definition for detailed explanation. |
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.
[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. |
0
- Success, -1
- Error.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.
[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. |
0
- Success, -1
- Error.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.
[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. |
0
- Success, -1
- Error.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.
[in] | ctx | : Click context object. See i2cisolator4_t object definition for detailed explanation. |
[in] | address | : Specified I2C slave address. |
0
- Success, -1
- Error.