i2cmux4 2.0.0.0
i2cmux4.h File Reference

This file contains API for I2C MUX 4 Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"

Go to the source code of this file.

Data Structures

struct  i2cmux4_t
 Click ctx object definition. More...
 
struct  i2cmux4_cfg_t
 Click configuration structure definition. More...
 

Macros

#define I2CMUX4_MAP_MIKROBUS(cfg, mikrobus)
 
#define I2CMUX4_RETVAL   uint8_t
 
#define I2CMUX4_OK   0x00
 
#define I2CMUX4_INIT_ERROR   0xFF
 
#define I2CMUX4_I2C_SLAVE_ADDRESS_0   0x70
 
#define I2CMUX4_I2C_SLAVE_ADDRESS_1   0x71
 
#define I2CMUX4_I2C_SLAVE_ADDRESS_2   0x72
 
#define I2CMUX4_I2C_SLAVE_ADDRESS_3   0x73
 
#define I2CMUX4_ENABLE_POWER_OFF   0x00
 
#define I2CMUX4_ENABLE_POWER_ON   0x01
 
#define I2CMUX4_SEL_CH_ALL_DISABLE   0x00
 
#define I2CMUX4_SEL_CH_0   0x01
 
#define I2CMUX4_SEL_CH_1   0x02
 
#define I2CMUX4_INTERRUPT_CH_0   0x10
 
#define I2CMUX4_INTERRUPT_CH_1   0x20
 
#define I2CMUX4_INTERRUPT_BIT_MASK   0x30
 

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.
 

Detailed Description

This file contains API for I2C MUX 4 Click driver.