i2cmux6  2.0.0.0
Modules | Functions
I2C MUX 6 Click Driver

API for configuring and manipulating I2C MUX 6 Click driver. More...

Modules

 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. More...
 
err_t i2cmux6_init (i2cmux6_t *ctx, i2cmux6_cfg_t *cfg)
 I2C MUX 6 initialization function. More...
 
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. More...
 
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. More...
 
err_t i2cmux6_set_channel (i2cmux6_t *ctx, uint8_t ch_sel, uint8_t ch_slave_addr)
 I2C MUX 6 set channel function. More...
 

Detailed Description

API for configuring and manipulating I2C MUX 6 Click driver.

Function Documentation

◆ i2cmux6_cfg_setup()

void i2cmux6_cfg_setup ( i2cmux6_cfg_t cfg)

I2C MUX 6 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See i2cmux6_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ i2cmux6_generic_read()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ i2cmux6_generic_write()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ i2cmux6_init()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ i2cmux6_set_channel()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.