i2cisolator3 2.0.0.0
|
API for configuring and manipulating I2C Isolator 3 Click driver. More...
Topics | |
I2C Isolator 3 Registers Settings | |
Settings for registers of I2C Isolator 3 Click driver. | |
I2C Isolator 3 MikroBUS Map | |
MikroBUS pin mapping of I2C Isolator 3 Click driver. | |
Functions | |
void | i2cisolator3_cfg_setup (i2cisolator3_cfg_t *cfg) |
I2C Isolator 3 configuration object setup function. | |
err_t | i2cisolator3_init (i2cisolator3_t *ctx, i2cisolator3_cfg_t *cfg) |
I2C Isolator 3 initialization function. | |
err_t | i2cisolator3_generic_write (i2cisolator3_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len) |
I2C Isolator 3 I2C writing function. | |
err_t | i2cisolator3_generic_read (i2cisolator3_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
I2C Isolator 3 I2C reading function. | |
void | i2cisolator3_send_cmd (i2cisolator3_t *ctx, uint8_t command) |
I2C Isolator 3 send command function. | |
void | i2cisolator3_write_byte (i2cisolator3_t *ctx, uint8_t reg, uint8_t tx_data) |
I2C Isolator 3 write the byte of data function. | |
uint8_t | i2cisolator3_read_byte (i2cisolator3_t *ctx, uint8_t reg) |
I2C Isolator 3 read the byte of data function. | |
err_t | i2cisolator3_burst_write (i2cisolator3_t *ctx, uint8_t reg, uint8_t *p_tx_data, uint8_t n_bytes) |
I2C Isolator 3 burst write function. | |
err_t | i2cisolator3_burst_read (i2cisolator3_t *ctx, uint8_t reg, uint8_t *p_rx_data, uint8_t n_bytes) |
I2C Isolator 3 burst read function. | |
err_t | i2cisolator3_adv_write (i2cisolator3_t *ctx, uint8_t *p_reg, uint8_t n_reg_bytes, uint8_t *p_tx_data, uint8_t n_tx_data_bytes) |
I2C Isolator 3 advanced write function. | |
err_t | i2cisolator3_adv_read (i2cisolator3_t *ctx, uint8_t *p_reg, uint8_t n_reg_bytes, uint8_t *p_rx_data, uint8_t n_rx_data_bytes) |
I2C Isolator 3 advanced read function. | |
API for configuring and manipulating I2C Isolator 3 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
err_t i2cisolator3_adv_read | ( | i2cisolator3_t * | ctx, |
uint8_t * | p_reg, | ||
uint8_t | n_reg_bytes, | ||
uint8_t * | p_rx_data, | ||
uint8_t | n_rx_data_bytes ) |
I2C Isolator 3 advanced read function.
The function advanced read, read sequential data starting from the targeted ( selectable ) register address of the remote device wired with CPC5902, Optically Isolated I2C Bus Repeater on I2C Isolator 3 click board.
[in] | ctx | : Click context object. See i2cisolator3_t object definition for detailed explanation. |
[in] | p_reg | : pointer to the memory address. |
[in] | n_reg_bytes | : the number of bytes of the registry address. |
[in] | p_rx_data | : pointer to the memory location where data be stored. |
[in] | n_rx_data_bytes | : number of bytes to be read. |
0
- Success, -1
- Error. err_t i2cisolator3_adv_write | ( | i2cisolator3_t * | ctx, |
uint8_t * | p_reg, | ||
uint8_t | n_reg_bytes, | ||
uint8_t * | p_tx_data, | ||
uint8_t | n_tx_data_bytes ) |
I2C Isolator 3 advanced write function.
The function advanced write, writes sequential data starting of the targeted ( selectable ) register address of the remote device wired with CPC5902, Optically Isolated I2C Bus Repeater on I2C Isolator 3 click board.
[in] | ctx | : Click context object. See i2cisolator3_t object definition for detailed explanation. |
[in] | p_reg | : pointer to the memory address. |
[in] | n_reg_bytes | : the number of bytes of the registry address. |
[in] | p_tx_data | : pointer to the data to be written. |
[in] | n_tx_data_bytes | : number of bytes to be written. |
0
- Success, -1
- Error. err_t i2cisolator3_burst_read | ( | i2cisolator3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | p_rx_data, | ||
uint8_t | n_bytes ) |
I2C Isolator 3 burst read function.
The function read sequential data starting from the targeted 8-bit register address of the remote device wired with CPC5902, Optically Isolated I2C Bus Repeater on I2C Isolator 3 click board.
[in] | ctx | : Click context object. See i2cisolator3_t object definition for detailed explanation. |
[in] | reg | : 8-bit memory address. |
[in] | p_rx_data | : pointer to the memory location where data be stored. |
[in] | n_bytes | : number of bytes to be read. |
0
- Success, -1
- Error. err_t i2cisolator3_burst_write | ( | i2cisolator3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | p_tx_data, | ||
uint8_t | n_bytes ) |
I2C Isolator 3 burst write function.
The function writes sequential data starting to the targeted 8-bit register address of the remote device wired with CPC5902, Optically Isolated I2C Bus Repeater on I2C Isolator 3 click board.
[in] | ctx | : Click context object. See i2cisolator3_t object definition for detailed explanation. |
[in] | reg | : 8-bit register address. |
[in] | p_tx_data | : pointer to the data to be written. |
[in] | n_bytes | : number of bytes to be written. |
0
- Success, -1
- Error. void i2cisolator3_cfg_setup | ( | i2cisolator3_cfg_t * | cfg | ) |
I2C Isolator 3 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See i2cisolator3_cfg_t object definition for detailed explanation. |
err_t i2cisolator3_generic_read | ( | i2cisolator3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | rx_buf, | ||
uint8_t | rx_len ) |
I2C Isolator 3 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 i2cisolator3_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 i2cisolator3_generic_write | ( | i2cisolator3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | tx_buf, | ||
uint8_t | tx_len ) |
I2C Isolator 3 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 i2cisolator3_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 i2cisolator3_init | ( | i2cisolator3_t * | ctx, |
i2cisolator3_cfg_t * | cfg ) |
I2C Isolator 3 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See i2cisolator3_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See i2cisolator3_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.uint8_t i2cisolator3_read_byte | ( | i2cisolator3_t * | ctx, |
uint8_t | reg ) |
I2C Isolator 3 read the byte of data function.
The function read a the byte of data from the targeted 8-bit register address of the remote device wired with CPC5902, Optically Isolated I2C Bus Repeater on I2C Isolator 3 click board.
[in] | ctx | : Click context object. See i2cisolator3_t object definition for detailed explanation. |
[in] | reg | : 8-bit register address. |
void i2cisolator3_send_cmd | ( | i2cisolator3_t * | ctx, |
uint8_t | command ) |
I2C Isolator 3 send command function.
The function sends the desired command to a remote device wired with CPC5902, Optically Isolated I2C Bus Repeater on I2C Isolator 3 click board.
[in] | ctx | : Click context object. See i2cisolator3_t object definition for detailed explanation. |
[in] | command | : 8-bit commands instruction. |
void i2cisolator3_write_byte | ( | i2cisolator3_t * | ctx, |
uint8_t | reg, | ||
uint8_t | tx_data ) |
I2C Isolator 3 write the byte of data function.
The function writes the byte of data to the targeted 8-bit register address of the remote device wired with CPC5902, Optically Isolated I2C Bus Repeater on I2C Isolator 3 click board.
[in] | ctx | : Click context object. See i2cisolator3_t object definition for detailed explanation. |
[in] | reg | : 8-bit register address. |
[in] | tx_data | : 8-bit data to be written. |