i2cmux4 2.0.0.0
|
Functions | |
void | i2cmux4_cfg_setup (i2cmux4_cfg_t *cfg) |
Config Object Initialization function. | |
I2CMUX4_RETVAL | i2cmux4_init (i2cmux4_t *ctx, i2cmux4_cfg_t *cfg) |
Initialization function. | |
void | i2cmux4_generic_write (i2cmux4_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | i2cmux4_generic_read (i2cmux4_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | i2cmux4_power_on (i2cmux4_t *ctx, uint8_t enable) |
Power On function. | |
void | i2cmux4_hw_reset (i2cmux4_t *ctx) |
Hardware reset function. | |
void | i2cmux4_write_cmd (i2cmux4_t *ctx, uint8_t cmd_data) |
Write command function. | |
uint8_t | i2cmux4_read_cmd (i2cmux4_t *ctx) |
Read command function. | |
void | i2cmux4_set_channel (i2cmux4_t *ctx, uint8_t sel_ch, uint8_t ch_slave_addr) |
Set channel function. | |
uint8_t | i2cmux4_get_ch_interrupt (i2cmux4_t *ctx) |
Get channel interrupt function. | |
void | i2cmux4_rmt_write_bytes (i2cmux4_t *ctx, uint8_t reg, uint8_t *p_tx_data, uint8_t n_bytes) |
Generic rmt write data function. | |
void | i2cmux4_rmt_read_bytes (i2cmux4_t *ctx, uint8_t reg, uint8_t *p_rx_data, uint8_t n_bytes) |
Generic read data function. | |
uint8_t | i2cmux4_check_int (i2cmux4_t *ctx) |
Check interrupt function. | |
void i2cmux4_cfg_setup | ( | i2cmux4_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t i2cmux4_check_int | ( | i2cmux4_t * | ctx | ) |
Check interrupt function.
ctx | Click object. |
@description The function get INT pin state of I2C MUX 4 click board.
void i2cmux4_generic_read | ( | i2cmux4_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function reads data from the desired register.
void i2cmux4_generic_write | ( | i2cmux4_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function writes data to the desired register.
uint8_t i2cmux4_get_ch_interrupt | ( | i2cmux4_t * | ctx | ) |
Get channel interrupt function.
ctx | Click object. |
@description The function get channel interrupt of the I2C MUX 4 click board.
void i2cmux4_hw_reset | ( | i2cmux4_t * | ctx | ) |
Hardware reset function.
ctx | Click object. |
@description The function hardware reset I2C MUX 4 click board by cleared to '0' state of the RST pin, wait the 100 ms, sets to '1' state of the RST pin and wait another the 100 ms.
I2CMUX4_RETVAL i2cmux4_init | ( | i2cmux4_t * | ctx, |
i2cmux4_cfg_t * | cfg ) |
Initialization function.
i2cmux4 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void i2cmux4_power_on | ( | i2cmux4_t * | ctx, |
uint8_t | enable ) |
Power On function.
ctx | Click object. |
@description The function enable or disable the I2C MUX 4 click board by set to '1' or cleared to '0' state of the RST pin.
uint8_t i2cmux4_read_cmd | ( | i2cmux4_t * | ctx | ) |
Read command function.
ctx | Click object. |
Function executes read command from the TCA9543A Low Voltage 2-Channel I2C Bus Switch With Interrupt Logic And Reset on the I2C MUX 4 click board.
void i2cmux4_rmt_read_bytes | ( | i2cmux4_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | p_rx_data, | ||
uint8_t | n_bytes ) |
Generic read data function.
ctx | Click object. |
reg | 8-bit register address. |
p_rx_data | pointer to the memory location where data be stored. |
n_bytes | number of bytes to be read. |
@description The function read a sequential data starting from the targeted 8-bit register address of register address of the device connected to the desired channel of the I2C MUX 4 click board.
void i2cmux4_rmt_write_bytes | ( | i2cmux4_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | p_tx_data, | ||
uint8_t | n_bytes ) |
Generic rmt write data function.
ctx | Click object. |
reg | 8-bit register address. |
p_tx_data | pointer to the data to be written. |
n_bytes | number of bytes to be written. |
@description The function writes a sequential data starting to the targeted 8-bit register address of the device connected to the desired channel of the I2C MUX 4 click board.
void i2cmux4_set_channel | ( | i2cmux4_t * | ctx, |
uint8_t | sel_ch, | ||
uint8_t | ch_slave_addr ) |
Set channel function.
ctx | Click object. |
sel_ch | select channel:
|
ch_slave_addr | 7-bit i2c slave address of the device connected to the selected channel. |
@description The function sets channel and slave address of the device connected to the selected channel of the I2C MUX 4 click board.
void i2cmux4_write_cmd | ( | i2cmux4_t * | ctx, |
uint8_t | cmd_data ) |
Write command function.
ctx | Click object. |
cmd_data | 8-bit command data to be transmitted. |
@description The function executes writes command to the TCA9543A Low Voltage 2-Channel I2C Bus Switch With Interrupt Logic And Reset on the I2C MUX 4 click board.