i2cisolator5 2.1.0.0
|
API for configuring and manipulating I2C Isolator 5 Click driver. More...
Topics | |
I2C Isolator 5 Registers Settings | |
Settings for registers of I2C Isolator 5 Click driver. | |
I2C Isolator 5 MikroBUS Map | |
MikroBUS pin mapping of I2C Isolator 5 Click driver. | |
Functions | |
void | i2cisolator5_cfg_setup (i2cisolator5_cfg_t *cfg) |
I2C Isolator 5 configuration object setup function. | |
err_t | i2cisolator5_init (i2cisolator5_t *ctx, i2cisolator5_cfg_t *cfg) |
I2C Isolator 5 initialization function. | |
err_t | i2cisolator5_default_cfg (i2cisolator5_t *ctx) |
I2C Isolator 5 default configuration function. | |
err_t | i2cisolator5_write (i2cisolator5_t *ctx, uint8_t *data_in, uint8_t len) |
I2C Isolator 5 I2C writing function. | |
err_t | i2cisolator5_read (i2cisolator5_t *ctx, uint8_t *data_out, uint8_t len) |
I2C Isolator 5 I2C reading function. | |
err_t | i2cisolator5_write_then_read (i2cisolator5_t *ctx, uint8_t *data_in, uint8_t data_in_len, uint8_t *data_out, uint8_t data_out_len) |
I2C Isolator 5 I2C write then read function. | |
err_t | i2cisolator5_set_slave_address (i2cisolator5_t *ctx, uint8_t address) |
I2C Isolator 5 set I2C Slave address function. | |
void | i2cisolator5_set_outa_state (i2cisolator5_t *ctx, uint8_t outa_state) |
I2C Isolator 5 set output A state function. | |
void | i2cisolator5_set_outb_state (i2cisolator5_t *ctx, uint8_t outb_state) |
I2C Isolator 5 set output B state function. | |
uint8_t | i2cisolator5_get_ina_state (i2cisolator5_t *ctx) |
I2C Isolator 5 get input A state function. | |
API for configuring and manipulating I2C Isolator 5 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void i2cisolator5_cfg_setup | ( | i2cisolator5_cfg_t * | cfg | ) |
I2C Isolator 5 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See i2cisolator5_cfg_t object definition for detailed explanation. |
err_t i2cisolator5_default_cfg | ( | i2cisolator5_t * | ctx | ) |
I2C Isolator 5 default configuration function.
This function executes a default configuration of I2C Isolator 5 click board.
[in] | ctx | : Click context object. See i2cisolator5_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t i2cisolator5_get_ina_state | ( | i2cisolator5_t * | ctx | ) |
I2C Isolator 5 get input A state function.
This function reads the state of the input A pin.
[in] | ctx | : Click context object. See i2cisolator5_t object definition for detailed explanation. |
err_t i2cisolator5_init | ( | i2cisolator5_t * | ctx, |
i2cisolator5_cfg_t * | cfg ) |
I2C Isolator 5 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See i2cisolator5_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See i2cisolator5_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t i2cisolator5_read | ( | i2cisolator5_t * | ctx, |
uint8_t * | data_out, | ||
uint8_t | len ) |
I2C Isolator 5 I2C reading function.
This function reads a desired number of data bytes by using I2C serial interface.
[in] | ctx | : Click context object. See i2cisolator5_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. void i2cisolator5_set_outa_state | ( | i2cisolator5_t * | ctx, |
uint8_t | outa_state ) |
I2C Isolator 5 set output A state function.
This function sets the state of the out A pin.
[in] | ctx | : Click context object. See i2cisolator5_t object definition for detailed explanation. |
[in] | outa_state | : Specified out A pin state. |
void i2cisolator5_set_outb_state | ( | i2cisolator5_t * | ctx, |
uint8_t | outb_state ) |
I2C Isolator 5 set output B state function.
This function sets the state of the out B pin.
[in] | ctx | : Click context object. See i2cisolator5_t object definition for detailed explanation. |
[in] | outb_state | : Specified out B pin state. |
err_t i2cisolator5_set_slave_address | ( | i2cisolator5_t * | ctx, |
uint8_t | address ) |
I2C Isolator 5 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 i2cisolator5_t object definition for detailed explanation. |
[in] | address | : Specified I2C slave address. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t i2cisolator5_write | ( | i2cisolator5_t * | ctx, |
uint8_t * | data_in, | ||
uint8_t | len ) |
I2C Isolator 5 I2C writing function.
This function writes a desired number of data bytes by using I2C serial interface.
[in] | ctx | : Click context object. See i2cisolator5_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 i2cisolator5_write_then_read | ( | i2cisolator5_t * | ctx, |
uint8_t * | data_in, | ||
uint8_t | data_in_len, | ||
uint8_t * | data_out, | ||
uint8_t | data_out_len ) |
I2C Isolator 5 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 a number of write operations ( data from data_in ), a restart signal followed by number of read operations ( placed in data_out ), finishing the operation with a stop signal.
[in] | ctx | : Click context object. See i2cisolator5_t object definition for detailed explanation. |
[in] | data_in | : Data to be written. |
[in] | data_in_len | : Number of bytes to be written. |
[out] | data_out | : Output read data. |
[in] | data_out_len | : Number of bytes to be read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.