i2cextend2 2.0.0.0
i2cextend2.h File Reference

This file contains API for I2C Extend 2 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  i2cextend2_t
 I2C Extend 2 Click context object. More...
 
struct  i2cextend2_cfg_t
 I2C Extend 2 Click configuration object. More...
 

Macros

#define C6DOFIMU11_REG_WHO_AM_I   0x00
 I2C Extend 2 description register.
 
#define C6DOFIMU11_REG_CNTL2   0x3A
 
#define C6DOFIMU11_REG_INC3   0x2C
 
#define C6DOFIMU11_REG_ACCEL_XOUT_L   0x0A
 
#define C6DOFIMU11_REG_ACCEL_YOUT_L   0x0C
 
#define C6DOFIMU11_REG_ACCEL_ZOUT_L   0x0E
 
#define C6DOFIMU11_REG_MAG_XOUT_L   0x10
 
#define C6DOFIMU11_REG_MAG_YOUT_L   0x12
 
#define C6DOFIMU11_REG_MAG_ZOUT_L   0x14
 
#define I2CEXTEND2_EXTEND_DISABLE   0x00
 I2C Extend 2 Disable/Enable.
 
#define I2CEXTEND2_EXTEND_ENABLE   0x01
 
#define I2CEXTEND_PIN_STATE_LOW   0x00
 I2C Extend 2 pin state.
 
#define I2CEXTEND_PIN_STATE_HIGH   0x01
 
#define C6DOFIMU11_CNTL2_TEMP_EN_STANDBY_MODE   0x00
 6DOF IMU 11 bit mask.
 
#define C6DOFIMU11_CNTL2_MAG_EN_STANDBY_MODE   0x00
 
#define C6DOFIMU11_CNTL2_ACCEL_EN_STANDBY_MODE   0x00
 
#define C6DOFIMU11_INC3_IEL2_FIFO_TRIG   0x20
 
#define C6DOFIMU11_INC3_IEL1_FIFO_TRIG   0x02
 
#define C6DOFIMU11_CNTL2_ACCEL_EN_OPERATING_MODE   0x01
 
#define C6DOFIMU11_CNTL2_GSEL_8G   0x00
 
#define C6DOFIMU11_CNTL2_RES_MAX2   0x0C
 
#define C6DOFIMU11_CNTL2_MAG_EN_OPERATING_MODE   0x02
 
#define C6DOFIMU11_WHO_AM_I_WIA_ID   0x2D
 
#define C6DOFIMU11_I2C_SLAVE_ADDRESS_GND   0x0E
 6DOF IMU 11 device address setting.
 
#define C6DOFIMU11_I2C_SLAVE_ADDRESS_VCC   0x0F
 
#define I2CEXTEND2_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  i2cextend2_return_value_t { I2CEXTEND2_OK = 0 , I2CEXTEND2_ERROR = -1 }
 I2C Extend 2 Click return value data. More...
 

Functions

void i2cextend2_cfg_setup (i2cextend2_cfg_t *cfg)
 I2C Extend 2 configuration object setup function.
 
err_t i2cextend2_init (i2cextend2_t *ctx, i2cextend2_cfg_t *cfg)
 I2C Extend 2 initialization function.
 
void i2cextend2_rmt_write (i2cextend2_t *ctx, uint8_t reg, uint8_t tx_data)
 Generic write data in Remote Mode function.
 
uint8_t i2cextend2_rmt_read (i2cextend2_t *ctx, uint8_t reg)
 Generic read data in Remote Mode function.
 
void i2cextend2_rmt_multi_write (i2cextend2_t *ctx, uint8_t reg, uint8_t *p_tx_data, uint8_t n_bytes)
 Generic multi write data in Remote Mode function.
 
void i2cextend2_rmt_multi_read (i2cextend2_t *ctx, uint8_t reg, uint8_t *p_rx_data, uint8_t n_bytes)
 Generic multi read data in Remote Mode function.
 
void i2cextend2_enable (i2cextend2_t *ctx, uint8_t en_extend)
 Enable extend function.
 

Detailed Description

This file contains API for I2C Extend 2 Click Driver.

Enumeration Type Documentation

◆ i2cextend2_return_value_t

I2C Extend 2 Click return value data.

Predefined enum values for driver return values.

Enumerator
I2CEXTEND2_OK 
I2CEXTEND2_ERROR