i2cmux6 2.0.0.0
|
API for configuring and manipulating I2C MUX 6 Click driver. More...
Topics | |
I2C MUX 6 Registers Settings | |
Settings for registers of I2C MUX 6 Click driver. | |
I2C MUX 6 MikroBUS Map | |
MikroBUS pin mapping of I2C MUX 6 Click driver. | |
Functions | |
void | i2cmux6_cfg_setup (i2cmux6_cfg_t *cfg) |
I2C MUX 6 configuration object setup function. | |
err_t | i2cmux6_init (i2cmux6_t *ctx, i2cmux6_cfg_t *cfg) |
I2C MUX 6 initialization function. | |
err_t | i2cmux6_generic_write (i2cmux6_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len) |
I2C MUX 6 I2C writing function. | |
err_t | i2cmux6_generic_read (i2cmux6_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
I2C MUX 6 I2C reading function. | |
err_t | i2cmux6_set_channel (i2cmux6_t *ctx, uint8_t ch_sel, uint8_t ch_slave_addr) |
I2C MUX 6 set channel function. | |
API for configuring and manipulating I2C MUX 6 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void i2cmux6_cfg_setup | ( | i2cmux6_cfg_t * | cfg | ) |
I2C MUX 6 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See i2cmux6_cfg_t object definition for detailed explanation. |
err_t i2cmux6_generic_read | ( | i2cmux6_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | rx_buf, | ||
uint8_t | rx_len ) |
I2C MUX 6 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 i2cmux6_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. See #err_t definition for detailed explanation. err_t i2cmux6_generic_write | ( | i2cmux6_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | tx_buf, | ||
uint8_t | tx_len ) |
I2C MUX 6 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 i2cmux6_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. See #err_t definition for detailed explanation. err_t i2cmux6_init | ( | i2cmux6_t * | ctx, |
i2cmux6_cfg_t * | cfg ) |
I2C MUX 6 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See i2cmux6_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See i2cmux6_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t i2cmux6_set_channel | ( | i2cmux6_t * | ctx, |
uint8_t | ch_sel, | ||
uint8_t | ch_slave_addr ) |
I2C MUX 6 set channel function.
This function sets the desired channel active and configures its slave address.
[in] | ctx | : Click context object. See i2cmux6_t object definition for detailed explanation. |
[in] | ch_sel | : Channel selection bit mask. |
[in] | ch_slave_addr | : 7-bit slave address of the device connected to the channel. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.