i2cmux2 2.0.0.0
|
Functions | |
void | i2cmux2_cfg_setup (i2cmux2_cfg_t *cfg) |
Config Object Initialization function. | |
err_t | i2cmux2_init (i2cmux2_t *ctx, i2cmux2_cfg_t *cfg) |
Initialization function. | |
void | i2cmux2_generic_write (i2cmux2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | i2cmux2_generic_read (i2cmux2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | i2cmux2_hw_reset (i2cmux2_t *ctx) |
Hardware reset function. | |
void | i2cmux2_write_cmd (i2cmux2_t *ctx, uint8_t tx_data) |
Write command function. | |
uint8_t | i2cmux2_read_cmd (i2cmux2_t *ctx) |
Read command function. | |
void | i2cmux2_set_channel (i2cmux2_t *ctx, uint8_t channel, uint8_t ch_slave_address) |
Set channel function. | |
uint8_t | i2cmux2_read_interrupt (i2cmux2_t *ctx) |
Read interrupt status function. | |
uint8_t | i2cmux2_check_int (i2cmux2_t *ctx) |
Check interrupt status function. | |
void i2cmux2_cfg_setup | ( | i2cmux2_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
This function initializes click configuration structure to init state.
uint8_t i2cmux2_check_int | ( | i2cmux2_t * | ctx | ) |
Check interrupt status function.
ctx | Click object. |
1 : Not active;
Function check interrupt state by returning the state of the INT pin of I2C MUX 2 click board.
void i2cmux2_generic_read | ( | i2cmux2_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 |
This function reads data from the desired register.
void i2cmux2_generic_write | ( | i2cmux2_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. |
This function writes data to the desired register.
void i2cmux2_hw_reset | ( | i2cmux2_t * | ctx | ) |
Hardware reset function.
ctx | Click object. |
This function resets I2C MUX 2 click board by clearing the RST pin for 100ms.
err_t i2cmux2_init | ( | i2cmux2_t * | ctx, |
i2cmux2_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
This function initializes all necessary pins and peripherals used for this click.
uint8_t i2cmux2_read_cmd | ( | i2cmux2_t * | ctx | ) |
Read command function.
ctx | Click object. |
Function executes read command from the TCA9545A Low Voltage 4-Channel I2C on the I2C MUX 2 click board.
uint8_t i2cmux2_read_interrupt | ( | i2cmux2_t * | ctx | ) |
Read interrupt status function.
ctx | Click object. |
[ bit 3 ] : Interrupt on channel 3;
Function get interrupt status by reading from the TCA9545A Low Voltage 4-Channel I2C on the I2C MUX 2 click board.
void i2cmux2_set_channel | ( | i2cmux2_t * | ctx, |
uint8_t | channel, | ||
uint8_t | ch_slave_address ) |
Set channel function.
ctx | Click object. |
channel | 8-bit register address. |
ch_slave_address | pointer to the data to be written. |
Function sets channel of the I2C MUX 2 click board.
void i2cmux2_write_cmd | ( | i2cmux2_t * | ctx, |
uint8_t | tx_data ) |
Write command function.
ctx | Click object. |
tx_data | 8-bit data to be transmitted. |
Function executes writes command to the TCA9545A Low Voltage 4-Channel I2C on the I2C MUX 2 click board.