i2cmux3 2.0.0.0
|
Functions | |
void | i2cmux3_cfg_setup (i2cmux3_cfg_t *cfg) |
Config Object Initialization function. | |
I2CMUX3_RETVAL | i2cmux3_init (i2cmux3_t *ctx, i2cmux3_cfg_t *cfg) |
Initialization function. | |
void | i2cmux3_generic_write (i2cmux3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | i2cmux3_generic_read (i2cmux3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | i2cmux3_write_ctl (i2cmux3_t *ctx, uint8_t wr_data) |
Write Control Register function. | |
uint8_t | i2cmux3_read_ctl (i2cmux3_t *ctx) |
Read Control Register function. | |
void | i2cmux3_ch_sel (i2cmux3_t *ctx, uint8_t sel_ch) |
Select Channel function. | |
void | i2cmux3_wr_slv (i2cmux3_t *ctx, uint8_t slv_sel_adr, uint8_t reg, uint8_t *p_wr_data, uint8_t n_bytes) |
Slave Device Write function. | |
void | i2cmux3_rd_slv (i2cmux3_t *ctx, uint8_t slv_sel_adr, uint8_t reg, uint8_t *p_rd_data, uint8_t n_bytes) |
Slave Device Read function. | |
void | i2cmux3_dev_enable (i2cmux3_t *ctx, uint8_t stat) |
Device enable function. | |
void | i2cmux3_hw_rst (i2cmux3_t *ctx) |
Hardware reset function. | |
void i2cmux3_cfg_setup | ( | i2cmux3_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void i2cmux3_ch_sel | ( | i2cmux3_t * | ctx, |
uint8_t | sel_ch ) |
Select Channel function.
ctx | Click object. |
sel_ch | 8-bit data ranging from 0 to 7 that defines channel |
Function is used to select communication channel.
void i2cmux3_dev_enable | ( | i2cmux3_t * | ctx, |
uint8_t | stat ) |
Device enable function.
ctx | Click object. |
stat | value defines state of the device '1' Device enabled '0' Device disabled |
Function is used to enable or disable the device.
void i2cmux3_generic_read | ( | i2cmux3_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 i2cmux3_generic_write | ( | i2cmux3_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.
void i2cmux3_hw_rst | ( | i2cmux3_t * | ctx | ) |
Hardware reset function.
ctx | Click object. |
Function is used to perform hardware reset of the I2C MUX 4 click board.
I2CMUX3_RETVAL i2cmux3_init | ( | i2cmux3_t * | ctx, |
i2cmux3_cfg_t * | cfg ) |
Initialization function.
i2cmux3 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void i2cmux3_rd_slv | ( | i2cmux3_t * | ctx, |
uint8_t | slv_sel_adr, | ||
uint8_t | reg, | ||
uint8_t * | p_rd_data, | ||
uint8_t | n_bytes ) |
Slave Device Read function.
ctx | Click object. |
slv_sel_adr | I2C address of the connected slave device |
reg | 8-bit register address |
p_rd_data | pointer to the data to be read |
n_bytes | number of bytes to be written |
Function is used to read a sequential data starting from the targeted 8-bit register address of the device connected to the desired channel of the I2C MUX 3 click board.
uint8_t i2cmux3_read_ctl | ( | i2cmux3_t * | ctx | ) |
Read Control Register function.
ctx | Click object. |
Function is used to read from TCA9548A's control register.
void i2cmux3_wr_slv | ( | i2cmux3_t * | ctx, |
uint8_t | slv_sel_adr, | ||
uint8_t | reg, | ||
uint8_t * | p_wr_data, | ||
uint8_t | n_bytes ) |
Slave Device Write function.
ctx | Click object. |
slv_sel_adr | I2C address of the connected slave device |
reg | 8-bit register address |
p_wr_data | pointer to the data to be written |
n_bytes | number of bytes to be written |
Function is used to write a sequential data starting from the targeted 8-bit register address of the device connected to the desired channel of the I2C MUX 3 click board.
void i2cmux3_write_ctl | ( | i2cmux3_t * | ctx, |
uint8_t | wr_data ) |
Write Control Register function.
ctx | Click object. |
wr_data | 8-bit input data |
Function is used to write to TCA9548A's control register.