c6dofimu9 2.0.0.0
Functions

Functions

void c6dofimu9_cfg_setup (c6dofimu9_cfg_t *cfg)
 Config Object Initialization function. More...
 
C6DOFIMU9_RETVAL c6dofimu9_init (c6dofimu9_t *ctx, c6dofimu9_cfg_t *cfg)
 Initialization function. More...
 
void c6dofimu9_default_cfg (c6dofimu9_t *ctx)
 Click Default Configuration function. More...
 
void c6dofimu9_generic_write (c6dofimu9_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function. More...
 
void c6dofimu9_generic_read (c6dofimu9_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function. More...
 
uint8_t c6dofimu9_check_interrupt (c6dofimu9_t *ctx)
 Check interrupt state function. More...
 
void c6dofimu9_set_config (c6dofimu9_t *ctx, uint8_t config_data)
 Set configuration function. More...
 
void c6dofimu9_set_gyro_config (c6dofimu9_t *ctx, uint8_t gyro_config_data)
 Set Gyro configuration function. More...
 
void c6dofimu9_set_gyro_measurement_range (c6dofimu9_t *ctx, uint16_t gyro_full_scale_range)
 Set Gyro measurement range configuration function. More...
 
void c6dofimu9_set_accel_config (c6dofimu9_t *ctx, uint16_t accel_config_data)
 Set Accel configuration function. More...
 
void c6dofimu9_set_accel_measurement_range (c6dofimu9_t *ctx, uint8_t accel_full_scale_range)
 Set Accel measurement range configuration function. More...
 
void c6dofimu9_set_accel_avg_filter_mode (c6dofimu9_t *ctx, uint8_t accel_avg_samples)
 Set Accel averaging filter settings for Low Power mode function. More...
 
void c6dofimu9_set_gyro_config_lp_mode (c6dofimu9_t *ctx, uint8_t gyro_averages)
 Generic read function. More...
 
uint8_t c6dofimu9_get_accel_wake_on_motion_trsh (c6dofimu9_t *ctx)
 Get Accel wake-on motion threshold function. More...
 
void c6dofimu9_enable_fifo (c6dofimu9_t *ctx, uint8_t en_fifo_data)
 Enable FIFO configuration function. More...
 
void c6dofimu9_enable_accel_interrupt (c6dofimu9_t *ctx)
 Enable Accel interrupt function. More...
 
void c6dofimu9_enable_gyro_interrupt (c6dofimu9_t *ctx)
 Enable Gyro interrupt function. More...
 
void c6dofimu9_enable_data_ready_interrupt (c6dofimu9_t *ctx)
 Enable data ready interrupt function. More...
 
uint8_t c6dofimu9_get_interrupt_status (c6dofimu9_t *ctx)
 Get interrupt status function. More...
 
void c6dofimu9_reset_accel_signal (c6dofimu9_t *ctx)
 Reset Accel signal path function. More...
 
void c6dofimu9_reset_gyro_signal (c6dofimu9_t *ctx)
 Reset Gyro signal path function. More...
 
void c6dofimu9_enable_accel_wake_on_motion (c6dofimu9_t *ctx)
 Enable the Wake-on-Motion detection function. More...
 
void c6dofimu9_reset_default (c6dofimu9_t *ctx)
 Reset the internal registers and restores the default settings function. More...
 
void c6dofimu9_set_sleep_mode (c6dofimu9_t *ctx)
 Set the device to sleep mode function. More...
 
void c6dofimu9_set_standby_mode (c6dofimu9_t *ctx)
 Set the device to standby mode function. More...
 
uint8_t c6dofimu9_get_device_id (c6dofimu9_t *ctx)
 Get device ID function. More...
 
int16_t c6dofimu9_get_axis (c6dofimu9_t *ctx, uint8_t addr_reg_msb, uint8_t addr_reg_lsb)
 Get axis data function. More...
 
void c6dofimu9_get_accel_data (c6dofimu9_t *ctx, int16_t *p_accel_x, int16_t *p_accel_y, int16_t *p_accel_z)
 Read Accel X-axis, Y-axis and Z-axis axis function. More...
 
void c6dofimu9_get_gyro_data (c6dofimu9_t *ctx, int16_t *p_gyro_x, int16_t *p_gyro_y, int16_t *p_gyro_z)
 Read Gyro X-axis, Y-axis and Z-axis axis function. More...
 

Detailed Description

Function Documentation

◆ c6dofimu9_cfg_setup()

void c6dofimu9_cfg_setup ( c6dofimu9_cfg_t cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ c6dofimu9_check_interrupt()

uint8_t c6dofimu9_check_interrupt ( c6dofimu9_t ctx)

Check interrupt state function.

Parameters
ctxClick object.
Returns
Interrupt state:
  • 0 : No active;
  • 1 : Active; @description Function check interrupt state by return state of the INT pin of 6DOF IMU 9 Click board.

◆ c6dofimu9_default_cfg()

void c6dofimu9_default_cfg ( c6dofimu9_t ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for 6DOF IMU 9 click.

◆ c6dofimu9_enable_accel_interrupt()

void c6dofimu9_enable_accel_interrupt ( c6dofimu9_t ctx)

Enable Accel interrupt function.

Parameters
ctxClick object.

@description Function enable Accel interrupt of IAM-20680 High Performance Automotive 6-Axis MotionTracking Device on 6DOF IMU 9 Click board.

◆ c6dofimu9_enable_accel_wake_on_motion()

void c6dofimu9_enable_accel_wake_on_motion ( c6dofimu9_t ctx)

Enable the Wake-on-Motion detection function.

Parameters
ctxClick object.

@description Function enable the Wake-on-Motion detection of IAM-20680 High Performance Automotive 6-Axis MotionTracking Device on 6DOF IMU 9 Click board.

◆ c6dofimu9_enable_data_ready_interrupt()

void c6dofimu9_enable_data_ready_interrupt ( c6dofimu9_t ctx)

Enable data ready interrupt function.

Parameters
ctxClick object.

@description Function enable data ready interrupt of IAM-20680 High Performance Automotive 6-Axis MotionTracking Device on 6DOF IMU 9 Click board.

◆ c6dofimu9_enable_fifo()

void c6dofimu9_enable_fifo ( c6dofimu9_t ctx,
uint8_t  en_fifo_data 
)

Enable FIFO configuration function.

Parameters
ctxClick object.
en_fifo_data
Note
  • [ bit 7 ] : Write TEMP_OUT_H and TEMP_OUT_L to the FIFO at the sample rate:
    • 0 : Disabled;
    • 1 : Enabled;
  • [ bit 6 ] : Write GYRO_XOUT_H and GYRO_XOUT_L to the FIFO at the sample rate:
    • 0 : Disabled;
    • 1 : Enabled;
  • [ bit 5 ] : Write GYRO_YOUT_H and GYRO_YOUT_L to the FIFO at the sample rate:
    • 0 : Disabled;
    • 1 : Enabled;
  • [ bit 4 ] : Write GYRO_ZOUT_H and GYRO_ZOUT_L to the FIFO at the sample rate:
    • 0 : Disabled;
    • 1 : Enabled;
  • [ bit 3 ] : Write ACCEL_XOUT_H, ACCEL_XOUT_L, ACCEL_YOUT_H, ACCEL_YOUT_L, ACCEL_ZOUT_H and ACCEL_ZOUT_L to the FIFO at the sample rate:
    • 0 : Disabled;
    • 1 : Enabled;
  • [ bit 2 : 0 ] : Reserved; @description Function enable FIFO configuration by written the byte of data to the targeted C6DOFIMU9_REG_FIFO_EN register address of IAM-20680 High Performance Automotive 6-Axis MotionTracking Device on 6DOF IMU 9 Click board.

◆ c6dofimu9_enable_gyro_interrupt()

void c6dofimu9_enable_gyro_interrupt ( c6dofimu9_t ctx)

Enable Gyro interrupt function.

Parameters
ctxClick object.

@description Function enable Gyro interrupt of IAM-20680 High Performance Automotive 6-Axis MotionTracking Device on 6DOF IMU 9 Click board.

◆ c6dofimu9_generic_read()

void c6dofimu9_generic_read ( c6dofimu9_t ctx,
uint8_t  reg,
uint8_t *  data_buf,
uint8_t  len 
)

Generic read function.

Parameters
ctxClick object.
regRegister address.
data_bufData buf to be written.
lenNumber of the bytes in data buf.

@description This function reads data from the desired register.

◆ c6dofimu9_generic_write()

void c6dofimu9_generic_write ( c6dofimu9_t ctx,
uint8_t  reg,
uint8_t *  data_buf,
uint8_t  len 
)

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_bufOutput data buf
lenNumber of the bytes to be read

@description This function writes data to the desired register.

◆ c6dofimu9_get_accel_data()

void c6dofimu9_get_accel_data ( c6dofimu9_t ctx,
int16_t *  p_accel_x,
int16_t *  p_accel_y,
int16_t *  p_accel_z 
)

Read Accel X-axis, Y-axis and Z-axis axis function.

Parameters
ctxClick object.
p_accel_xpointer to memory location where Accel X-axis data be stored
p_accel_ypointer to memory location where Accel Y-axis data be stored
p_accel_zpointer to memory location where Accel Z-axis data be stored

@description Function reads 16-bit ( signed ) Accel X-axis, Y-axis data and Z-axis data from the targeted starts from C6DOFIMU9_REG_ACCEL_XOUT_H to the C6DOFIMU9_REG_ACCEL_ZOUT_L register address of IAM-20680 High Performance Automotive 6-Axis MotionTracking Device on 6DOF IMU 9 Click board.

◆ c6dofimu9_get_accel_wake_on_motion_trsh()

uint8_t c6dofimu9_get_accel_wake_on_motion_trsh ( c6dofimu9_t ctx)

Get Accel wake-on motion threshold function.

Parameters
ctxClick object.

@description Function get Accel wake-on motion threshold data from the targeted C6DOFIMU9_REG_ACCEL_WOM_THR register address of IAM-20680 High Performance Automotive 6-Axis MotionTracking Device on 6DOF IMU 9 Click board.

◆ c6dofimu9_get_axis()

int16_t c6dofimu9_get_axis ( c6dofimu9_t ctx,
uint8_t  addr_reg_msb,
uint8_t  addr_reg_lsb 
)

Get axis data function.

Parameters
ctxClick object.
addr_reg_msbleast significant bit register address
addr_reg_lsbmost significant bit register address

@description Function get axis data by read data from the two targeted register address of IAM-20680 High Performance Automotive 6-Axis MotionTracking Device on 6DOF IMU 9 Click board.

◆ c6dofimu9_get_device_id()

uint8_t c6dofimu9_get_device_id ( c6dofimu9_t ctx)

Get device ID function.

Parameters
ctxClick object.
Returns
8-bit device ID value ( default 0xA9 ); @description This function reads data from the desired register.

◆ c6dofimu9_get_gyro_data()

void c6dofimu9_get_gyro_data ( c6dofimu9_t ctx,
int16_t *  p_gyro_x,
int16_t *  p_gyro_y,
int16_t *  p_gyro_z 
)

Read Gyro X-axis, Y-axis and Z-axis axis function.

Parameters
ctxClick object.
p_gyro_xpointer to memory location where Accel X-axis data be stored
p_gyro_ypointer to memory location where Accel Y-axis data be stored
p_gyro_zpointer to memory location where Accel Z-axis data be stored

@description Function reads 16-bit ( signed ) Gyro X-axis, Y-axis data and Z-axis data from the targeted starts from C6DOFIMU9_REG_GYRO_XOUT_H to the C6DOFIMU9_REG_GYRO_ZOUT_L register address of IAM-20680 High Performance Automotive 6-Axis MotionTracking Device on 6DOF IMU 9 Click board.

◆ c6dofimu9_get_interrupt_status()

uint8_t c6dofimu9_get_interrupt_status ( c6dofimu9_t ctx)

Get interrupt status function.

Parameters
ctxClick object.
Returns
interrupt status
Note
  • [ bit 7 : 5 ] : Accelerometer WoM interrupt status. Cleared on Read;
  • [ bit 4 ] : This bit automatically sets to 1 when a FIFO buffer overflow has been generated. The bit clears to 0 after the register has been read;
  • [ bit 3 ] : Reserved;
  • [ bit 2 ] : Gyroscope Drive System Ready interrupt;
  • [ bit 1 ] : Reserved;
  • [ bit 0 ] : This bit automatically sets to 1 when a Data Ready interrupt is generated. The bit clears to 0 after the register has been read; *

@description Function Get interrupt status of the targeted C6DOFIMU9_REG_INT_STATUS register address of IAM-20680 High Performance Automotive 6-Axis MotionTracking Device on 6DOF IMU 9 Click board.

◆ c6dofimu9_init()

C6DOFIMU9_RETVAL c6dofimu9_init ( c6dofimu9_t ctx,
c6dofimu9_cfg_t cfg 
)

Initialization function.

Parameters
c6dofimu9Click object.
cfgClick configuration structure.

@description This function initializes all necessary pins and peripherals used for this click.

◆ c6dofimu9_reset_accel_signal()

void c6dofimu9_reset_accel_signal ( c6dofimu9_t ctx)

Reset Accel signal path function.

Parameters
ctxClick object.

@description Function reset Accel signal path of IAM-20680 High Performance Automotive 6-Axis MotionTracking Device on 6DOF IMU 9 Click board.

◆ c6dofimu9_reset_default()

void c6dofimu9_reset_default ( c6dofimu9_t ctx)

Reset the internal registers and restores the default settings function.

Parameters
ctxClick object.

@description Function reset the internal registers and restores the default settings of IAM-20680 High Performance Automotive 6-Axis MotionTracking Device on 6DOF IMU 9 Click board.

◆ c6dofimu9_reset_gyro_signal()

void c6dofimu9_reset_gyro_signal ( c6dofimu9_t ctx)

Reset Gyro signal path function.

Parameters
ctxClick object.

@description Function reset Gyro signal path of IAM-20680 High Performance Automotive 6-Axis MotionTracking Device on 6DOF IMU 9 Click board.

◆ c6dofimu9_set_accel_avg_filter_mode()

void c6dofimu9_set_accel_avg_filter_mode ( c6dofimu9_t ctx,
uint8_t  accel_avg_samples 
)

Set Accel averaging filter settings for Low Power mode function.

Parameters
ctxClick object.
accel_avg_samplesRegister address.
Note
  • 4 : Average 4 samples;
  • 8 : Average 8 samples;
  • 16 : Average 16 samples;
  • 32 : Average 32 samples; * @description Function set Accel averaging filter settings for Low Power mode data to the targeted C6DOFIMU9_REG_ACCEL_CONFIG_2 register address of IAM-20680 High Performance Automotive 6-Axis MotionTracking Device on 6DOF IMU 9 Click board.

◆ c6dofimu9_set_accel_config()

void c6dofimu9_set_accel_config ( c6dofimu9_t ctx,
uint16_t  accel_config_data 
)

Set Accel configuration function.

Parameters
ctxClick object.
accel_config_data
Note
  • [ bit 15 ] : X Accel self-test;
  • [ bit 14 ] : Y Accel self-test;
  • [ bit 13 ] : Z Accel self-test;
  • [ bit 12 : 11 ] : Accel Full Scale Select:
    • 0 : � 2g;
    • 1 : � 4g;
    • 2 : � 8g;
    • 3 : �16g;
  • [ bit 10 : 6 ] : Reserved;
  • [ bit 5 : 4 ] : Averaging filter settings for Low Power Accelerometer mode:
    • 0 : Average 4 samples;
    • 1 : Average 8 samples;
    • 2 : Average 16 samples;
    • 3 : Average 32 samples;
  • [ bit 3 ] : Used to bypass DLPF as shown;
  • [ bit 2 : 0 ] : Accelerometer 3-dB BW:
    • 0 : 1046.0 Hz;
    • 1 : 218.1 Hz;
    • 2 : 218.1 Hz;
    • 3 : 99.0 Hz;
    • 4 : 44.8 Hz;
    • 5 : 21.2 Hz;
    • 6 : 10.2 Hz;
    • 7 : 420.0 Hz; *

@description Function set Accel configuration data to the targeted C6DOFIMU9_REG_ACCEL_CONFIG and C6DOFIMU9_REG_ACCEL_CONFIG_2 register address of IAM-20680 High Performance Automotive 6-Axis MotionTracking Device on 6DOF IMU 9 Click board.

◆ c6dofimu9_set_accel_measurement_range()

void c6dofimu9_set_accel_measurement_range ( c6dofimu9_t ctx,
uint8_t  accel_full_scale_range 
)

Set Accel measurement range configuration function.

Parameters
ctxClick object.
accel_full_scale_range
Note
  • 2 : Accel Full Scale Select � 2g;
  • 4 : Accel Full Scale Select � 4g;
  • 8 : Accel Full Scale Select � 8g;
  • 16 : Accel Full Scale Select �16g; * @description Function set Accel measurement range configuration data to the targeted C6DOFIMU9_REG_ACCEL_CONFIG register address of IAM-20680 High Performance Automotive 6-Axis MotionTracking Device on 6DOF IMU 9 Click board.

◆ c6dofimu9_set_config()

void c6dofimu9_set_config ( c6dofimu9_t ctx,
uint8_t  config_data 
)

Set configuration function.

Parameters
ctxClick object.
config_dataRegister address.
Note
  • [ bit 7 ] : Always set to 0;
  • [ bit 6 ] : FIFO is full:
    • 0 : Additional writes will be written to the FIFO, replacing the oldest data;
    • 1 : Additional writes will not be written to FIFO;
  • [ bit 5 : 3 ] : Enables the FSYNC pin data to be sampled:
    • 0 : Function disabled;
    • 1 : TEMP_OUT_L;
    • 2 : GYRO_XOUT_L;
    • 3 : GYRO_YOUT_L;
    • 4 : GYRO_ZOUT_L;
    • 5 : ACCEL_XOUT_L;
    • 6 : ACCEL_YOUT_L;
    • 7 : ACCEL_ZOUT_L;
  • [ bit 2 : 0 ] : For the DLPF to be used; *

@description Function set configuration data to the targeted C6DOFIMU9_REG_CONFIG register address of IAM-20680 High Performance Automotive 6-Axis MotionTracking Device on 6DOF IMU 9 Click board.

◆ c6dofimu9_set_gyro_config()

void c6dofimu9_set_gyro_config ( c6dofimu9_t ctx,
uint8_t  gyro_config_data 
)

Set Gyro configuration function.

Parameters
ctxClick object.
gyro_config_data
Note
  • [ bit 7 ] : X Gyro self-test;
  • [ bit 6 ] : Y Gyro self-test;
  • [ bit 5 ] : Z Gyro self-test;
  • [ bit 4 : 3 ] : Gyro Full Scale Select:
    • 0 : � 250 dps;
    • 1 : � 500 dps;
    • 2 : �1000 dps;
    • 3 : �2000 dps;
  • [ bit 2 ] : Reserved;
  • [ bit 1 : 0 ] : Used to bypass DLPF as shown in Table 16 above; *

@description Function set Gyro configuration data to the targeted C6DOFIMU9_REG_GYRO_CONFIG register address of IAM-20680 High Performance Automotive 6-Axis MotionTracking Device on 6DOF IMU 9 Click board.

◆ c6dofimu9_set_gyro_config_lp_mode()

void c6dofimu9_set_gyro_config_lp_mode ( c6dofimu9_t ctx,
uint8_t  gyro_averages 
)

Generic read function.

Parameters
ctxClick object.
gyro_averagesRegister address.
Note
  • [ bit 7 ] : Low-power gyroscope mode:
    • 0 : Disabled ( Default );
    • 1 : Enabled;
  • [ bit 6 : 4 ] : Averaging filter configuration for low-power gyroscope mode:
    • 0 : Averages 1x; Ton (ms) 1.73; Noise BW (Hz) 650.8;
    • 1 : Averages 2x; Ton (ms) 2.23; Noise BW (Hz) 407.1;
    • 2 : Averages 4x; Ton (ms) 3.23; Noise BW (Hz) 224.2;
    • 3 : Averages 8x; Ton (ms) 5.23; Noise BW (Hz) 117.4;
    • 4 : Averages 16x; Ton (ms) 9.23; Noise BW (Hz) 60.2;
    • 5 : Averages 32x; Ton (ms) 17.23; Noise BW (Hz) 30.6;
    • 6 : Averages 64x; Ton (ms) 33.23; Noise BW (Hz) 15.6;
    • 7 : Averages 128x; Ton (ms) 65.23; Noise BW (Hz) 8.0;
  • [ bit 3 : 0 ] : Reserved;

@description Function set Gyro Low-Power mode configuration data to the targeted C6DOFIMU9_REG_LP_MODE_CFG register address of IAM-20680 High Performance Automotive 6-Axis MotionTracking Device on 6DOF IMU 9 Click board.

◆ c6dofimu9_set_gyro_measurement_range()

void c6dofimu9_set_gyro_measurement_range ( c6dofimu9_t ctx,
uint16_t  gyro_full_scale_range 
)

Set Gyro measurement range configuration function.

Parameters
ctxClick object.
gyro_full_scale_range
Note
  • 250 : Gyro Full Scale Select � 250 dps;
  • 500 : Gyro Full Scale Select � 500 dps;
  • 1000 : Gyro Full Scale Select �1000 dps;
  • 2000 : Gyro Full Scale Select �2000 dps; *

@description Function set Gyro configuration data to the targeted C6DOFIMU9_REG_GYRO_CONFIG register address of IAM-20680 High Performance Automotive 6-Axis MotionTracking Device on 6DOF IMU 9 Click board.

◆ c6dofimu9_set_sleep_mode()

void c6dofimu9_set_sleep_mode ( c6dofimu9_t ctx)

Set the device to sleep mode function.

Parameters
ctxClick object.

@description Function set the device to sleep mode of IAM-20680 High Performance Automotive 6-Axis MotionTracking Device on 6DOF IMU 9 Click board.

◆ c6dofimu9_set_standby_mode()

void c6dofimu9_set_standby_mode ( c6dofimu9_t ctx)

Set the device to standby mode function.

Parameters
ctxClick object.

@description Function set the device to standby mode of IAM-20680 High Performance Automotive 6-Axis MotionTracking Device on 6DOF IMU 9 Click board.