c6dofimu 2.0.0.0
c6dofimu.h File Reference

This file contains API for 6DOF IMU Click driver. More...

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

Go to the source code of this file.

Data Structures

struct  c6dofimu_axis_t
 Gyro/Accel Axis structure. More...
 
struct  c6dofimu_s
 Click ctx object definition. More...
 
struct  c6dofimu_cfg_t
 Click configuration structure definition. More...
 

Macros

#define C6DOFIMU_MAP_MIKROBUS(cfg, mikrobus)
 
#define C6DOFIMU_MASTER_I2C   0
 
#define C6DOFIMU_MASTER_SPI   1
 
#define C6DOFIMU_RETVAL   uint8_t
 
#define C6DOFIMU_OK   0x00
 
#define C6DOFIMU_INIT_ERROR   0xFF
 
#define C6DOFIMU_SLAVE_ADDRESS   0x6B;
 
#define C6DOFIMU_FUNC_CFG_ACCESS   0x01
 
#define C6DOFIMU_FIFO_CTRL1   0x06
 
#define C6DOFIMU_FIFO_CTRL2   0x07
 
#define C6DOFIMU_FIFO_CTRL3   0x08
 
#define C6DOFIMU_FIFO_CTRL4   0x09
 
#define C6DOFIMU_FIFO_CTRL5   0x0A
 
#define C6DOFIMU_ORIENT_CFG_G   0x0B
 
#define C6DOFIMU_INT1_CTRL   0x0D
 
#define C6DOFIMU_INT2_CTRL   0x0E
 
#define C6DOFIMU_CTRL1_XL   0x10
 
#define C6DOFIMU_CTRL2_G   0x11
 
#define C6DOFIMU_CTRL3_C   0x12
 
#define C6DOFIMU_CTRL4_C   0x13
 
#define C6DOFIMU_CTRL5_C   0x14
 
#define C6DOFIMU_CTRL6_C   0x15
 
#define C6DOFIMU_CTRL7_G   0x16
 
#define C6DOFIMU_CTRL8_XL   0x17
 
#define C6DOFIMU_CTRL9_XL   0x18
 
#define C6DOFIMU_CTRL10_C   0x19
 
#define C6DOFIMU_OUT_TEMP_L   0x20
 
#define C6DOFIMU_OUT_TEMP_H   0x21
 
#define C6DOFIMU_OUTX_L_G   0x22
 
#define C6DOFIMU_OUTX_H_G   0x23
 
#define C6DOFIMU_OUTY_L_G   0x24
 
#define C6DOFIMU_OUTY_H_G   0x25
 
#define C6DOFIMU_OUTZ_L_G   0x26
 
#define C6DOFIMU_OUTZ_H_G   0x27
 
#define C6DOFIMU_OUTX_L_XL   0x28
 
#define C6DOFIMU_OUTX_H_XL   0x29
 
#define C6DOFIMU_OUTY_L_XL   0x2A
 
#define C6DOFIMU_OUTY_H_XL   0x2B
 
#define C6DOFIMU_OUTZ_L_XL   0x2C
 
#define C6DOFIMU_OUTZ_H_XL   0x2D
 
#define C6DOFIMU_FIFO_DATA_OUT_L   0x3E
 
#define C6DOFIMU_FIFO_DATA_OUT_H   0x3F
 
#define C6DOFIMU_TIMESTAMP0_REG   0x40
 
#define C6DOFIMU_TIMESTAMP1_REG   0x41
 
#define C6DOFIMU_TIMESTAMP2_REG   0x42
 
#define C6DOFIMU_STEP_COUNTER_L   0x4B
 
#define C6DOFIMU_STEP_COUNTER_H   0x4C
 
#define C6DOFIMU_STATUS_REG   0x1E
 
#define C6DOFIMU_FIFO_STATUS1   0x3A
 
#define C6DOFIMU_FIFO_STATUS2   0x3B
 
#define C6DOFIMU_FIFO_STATUS3   0x3C
 
#define C6DOFIMU_FIFO_STATUS4   0x3D
 
#define C6DOFIMU_TIMESTAMP_L   0x49
 
#define C6DOFIMU_TIMESTAMP_H   0x4A
 
#define C6DOFIMU_WHO_AM_I   0x0F
 
#define C6DOFIMU_WAKE_UP_SRC   0x1B
 
#define C6DOFIMU_TAP_SRC   0x1C
 
#define C6DOFIMU_D6D_SRC   0x1D
 
#define C6DOFIMU_FUN_SRC   0x53
 
#define C6DOFIMU_TAP_CFG   0x58
 
#define C6DOFIMU_TAP_THS_6D   0x59
 
#define C6DOFIMU_INT_DUR2   0x5A
 
#define C6DOFIMU_WAKE_UP_THS   0x5B
 
#define C6DOFIMU_WAKE_UP_DUR   0x5C
 
#define C6DOFIMU_FREE_FALL   0x5D
 
#define C6DOFIMU_MD1_CFG   0x5E
 
#define C6DOFIMU_MD2_CFG   0x5F
 
#define C6DOFIMU_CFG_BIT_0   0x01
 
#define C6DOFIMU_CFG_BIT_1   0x02
 
#define C6DOFIMU_CFG_BIT_2   0x04
 
#define C6DOFIMU_CFG_BIT_3   0x08
 
#define C6DOFIMU_CFG_BIT_4   0x10
 
#define C6DOFIMU_CFG_BIT_5   0x20
 
#define C6DOFIMU_CFG_BIT_6   0x40
 
#define C6DOFIMU_CFG_BIT_7   0x80
 
#define C6DOFIMU_ACCEL_READ_MODE   0x00
 
#define C6DOFIMU_GYRO_READ_MODE   0x01
 

Typedefs

typedef uint8_t c6dofimu_select_t
 Communication type.
 
typedef void(* c6dofimu_master_io_t) (struct c6dofimu_s *, uint8_t, uint8_t *, uint8_t)
 Master Input/Output type.
 
typedef struct c6dofimu_s c6dofimu_t
 Click ctx object definition.
 

Functions

void c6dofimu_cfg_setup (c6dofimu_cfg_t *cfg)
 Config Object Initialization function.
 
C6DOFIMU_RETVAL c6dofimu_init (c6dofimu_t *ctx, c6dofimu_cfg_t *cfg)
 Initialization function.
 
void c6dofimu_default_cfg (c6dofimu_t *ctx)
 Click Default Configuration function.
 
void c6dofimu_generic_write (c6dofimu_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void c6dofimu_generic_read (c6dofimu_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void c6dofimu_read_axis_data (c6dofimu_t *ctx, uint8_t read_mode)
 Read axis data function.
 
float c6dofimu_read_temperature (c6dofimu_t *ctx)
 Read temperature data function.
 
uint8_t c6dofimu_digital_read_int (c6dofimu_t *ctx)
 Digital read interrupt function.
 

Detailed Description

This file contains API for 6DOF IMU Click driver.