i2cmux3 2.0.0.0
i2cmux3.h File Reference

This file contains API for I2C Mux 3 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  i2cmux3_t
 Click ctx object definition. More...
 
struct  i2cmux3_cfg_t
 Click configuration structure definition. More...
 

Macros

#define I2CMUX3_MAP_MIKROBUS(cfg, mikrobus)
 
#define I2CMUX3_RETVAL   uint8_t
 
#define I2CMUX3_OK   0x00
 
#define I2CMUX3_INIT_ERROR   0xFF
 
#define I2CMUX3_DEV_ADR_0   0x70
 
#define I2CMUX3_DEV_ADR_1   0x71
 
#define I2CMUX3_DEV_ADR_2   0x72
 
#define I2CMUX3_DEV_ADR_3   0x73
 
#define I2CMUX3_DEV_ADR_4   0x74
 
#define I2CMUX3_DEV_ADR_5   0x75
 
#define I2CMUX3_DEV_ADR_6   0x76
 
#define I2CMUX3_DEV_ADR_7   0x77
 
#define I2CMUX3_DIS_ALL_CH   0x00
 
#define I2CMUX3_SEL_CH_0   0x01
 
#define I2CMUX3_SEL_CH_1   0x02
 
#define I2CMUX3_SEL_CH_2   0x04
 
#define I2CMUX3_SEL_CH_3   0x08
 
#define I2CMUX3_SEL_CH_4   0x10
 
#define I2CMUX3_SEL_CH_5   0x20
 
#define I2CMUX3_SEL_CH_6   0x40
 
#define I2CMUX3_SEL_CH_7   0x80
 
#define I2CMUX3_DEV_DIS   0x00
 
#define I2CMUX3_DEV_EN   0x01
 

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.
 

Detailed Description

This file contains API for I2C Mux 3 Click driver.