| ICM42370P eMD Driver 2.2.7 Documentation of the eMD Driver API

- Main Page
- Related Pages
- Modules
- Classes
- Files

- File List
- File Members

Classes | Macros | Enumerations | Functions
inv_imu_driver.h File Reference
Driver
`#include "imu/inv_imu_defs.h"`
`#include "imu/inv_imu_transport.h"`
`#include "Invn/InvError.h"`
`#include <stdint.h>`
`#include <string.h>`
Include dependency graph for inv_imu_driver.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Classes
struct | inv_imu_sensor_event_t
| Sensor event structure definition. More...
struct | inv_imu_device
| IMU driver states definition. More...
struct | inv_imu_interrupt_parameter_t
| Interrupt definition. More...

## Macros
#define | ACCEL_CONFIG0_FS_SEL_MAX ACCEL_CONFIG0_FS_SEL_16g
| Max FSR values for accel. More...
#define | ACCEL_OFFUSER_MAX_MG 1000
| Max user offset value for accel (mg) More...
#define | ACC_STARTUP_TIME_US 10000
| Accel start-up time. More...
#define | FIFO_MIRRORING_SIZE 16 * 258
| Max buffer size mirrored from FIFO at polling time. More...

## Enumerations
enum | inv_imu_sensor { INV_SENSOR_ACCEL , INV_SENSOR_RESERVED1 , INV_SENSOR_RESERVED2 , INV_SENSOR_TEMPERATURE , INV_SENSOR_DMP_PEDOMETER_EVENT , INV_SENSOR_DMP_PEDOMETER_COUNT , INV_SENSOR_DMP_TILT , INV_SENSOR_DMP_FF , INV_SENSOR_DMP_LOWG , INV_SENSOR_DMP_SMD , INV_SENSOR_MAX }
| Sensor identifier for UI control function. More...
enum | INV_IMU_FIFO_CONFIG_t { INV_IMU_FIFO_DISABLED = 0 , INV_IMU_FIFO_ENABLED = 1 }
| Configure Fifo usage. More...
enum | inv_imu_interrupt_value { INV_IMU_DISABLE = 0 , INV_IMU_ENABLE }
| Interrupt enum state for INT1, INT2, and IBI. More...

## Functions
int | inv_imu_init (struct inv_imu_device *s, const struct inv_imu_serif *serif, void(*sensor_event_cb)(inv_imu_sensor_event_t *event))
| Initializes device. More...
int | inv_imu_device_reset (struct inv_imu_device *s)
| Reset device by reloading OTPs. More...
int | inv_imu_get_who_am_i (struct inv_imu_device *s, uint8_t *who_am_i)
| return WHOAMI value. More...
int | inv_imu_enable_accel_low_power_mode (struct inv_imu_device *s)
| Enable/put accel in low power mode. More...
int | inv_imu_enable_accel_low_noise_mode (struct inv_imu_device *s)
| Enable/put accel in low noise mode. More...
int | inv_imu_disable_accel (struct inv_imu_device *s)
| Disable all 3 axes of accel. More...
int | inv_imu_set_accel_frequency (struct inv_imu_device *s, const ACCEL_CONFIG0_ODR_t frequency)
| Configure accel Output Data Rate. More...
int | inv_imu_set_accel_lp_avg (struct inv_imu_device *s, ACCEL_CONFIG1_ACCEL_FILT_AVG_t acc_avg)
| Set accel Low-Power averaging value. More...
int | inv_imu_set_accel_ln_bw (struct inv_imu_device *s, ACCEL_CONFIG1_ACCEL_FILT_BW_t acc_bw)
| Set accel Low-Noise bandwidth value. More...
int | inv_imu_set_accel_fsr (struct inv_imu_device *s, ACCEL_CONFIG0_FS_SEL_t accel_fsr_g)
| Set accel full scale range. More...
int | inv_imu_get_accel_fsr (struct inv_imu_device *s, ACCEL_CONFIG0_FS_SEL_t *accel_fsr_g)
| Access accel full scale range. More...
int | inv_imu_set_config_int1 (struct inv_imu_device *s, const inv_imu_interrupt_parameter_t *it)
| Configure which interrupt source can trigger INT1. More...
int | inv_imu_get_config_int1 (struct inv_imu_device *s, inv_imu_interrupt_parameter_t *it)
| Retrieve interrupts configuration. More...
int | inv_imu_set_config_int2 (struct inv_imu_device *s, const inv_imu_interrupt_parameter_t *it)
| Configure which interrupt source can trigger INT2. More...
int | inv_imu_get_config_int2 (struct inv_imu_device *s, inv_imu_interrupt_parameter_t *it)
| Retrieve interrupts configuration. More...
int | inv_imu_get_data_from_registers (struct inv_imu_device *s)
| Read all registers containing data (temperature, accelerometer and gyroscope). More...
int | inv_imu_get_data_from_fifo (struct inv_imu_device *s)
| Read all available packets from the FIFO. More...
uint32_t | inv_imu_convert_odr_bitfield_to_us (uint32_t odr_bitfield)
| Converts ACCEL_CONFIG0_ODR_t or GYRO_CONFIG0_ODR_t enums to period expressed in us. More...
int | inv_imu_set_timestamp_resolution (struct inv_imu_device *s, const TMST_CONFIG1_RESOL_t timestamp_resol)
| Set timestamp resolution. More...
int | inv_imu_reset_fifo (struct inv_imu_device *s)
| Reset IMU fifo. More...
int | inv_imu_enable_high_resolution_fifo (struct inv_imu_device *s)
| Enable 20 bits raw acc and raw gyr data in fifo. More...
int | inv_imu_disable_high_resolution_fifo (struct inv_imu_device *s)
| Disable 20 bits raw acc and raw gyr data in fifo. More...
int | inv_imu_configure_fifo (struct inv_imu_device *s, INV_IMU_FIFO_CONFIG_t fifo_config)
| Configure Fifo. More...
uint32_t | inv_imu_get_timestamp_resolution_us (struct inv_imu_device *s)
| Get timestamp resolution. More...
int | inv_imu_configure_wom (struct inv_imu_device *s, const uint8_t wom_x_th, const uint8_t wom_y_th, const uint8_t wom_z_th, WOM_CONFIG_WOM_INT_MODE_t wom_int, WOM_CONFIG_WOM_INT_DUR_t wom_dur)
| Enable Wake On Motion. More...
int | inv_imu_enable_wom (struct inv_imu_device *s)
| Enable Wake On Motion. More...
int | inv_imu_disable_wom (struct inv_imu_device *s)
| Disable Wake On Motion. More...
int | inv_imu_start_dmp (struct inv_imu_device *s)
| Start DMP for APEX algorithms and selftest. More...
int | inv_imu_reset_dmp (struct inv_imu_device *s, const APEX_CONFIG0_DMP_MEM_RESET_t sram_reset)
| Reset DMP for APEX algorithms and selftest. More...
int | inv_imu_set_endianness (struct inv_imu_device *s, INTF_CONFIG0_DATA_ENDIAN_t endianness)
| Set the UI endianness and set the inv_device endianness field. More...
int | inv_imu_get_endianness (struct inv_imu_device *s)
| Read the UI endianness and set the inv_device endianness field. More...
int | inv_imu_configure_fifo_data_rate (struct inv_imu_device *s, FDR_CONFIG_FDR_SEL_t dec_factor)
| Configure Fifo decimation. More...
const char * | inv_imu_get_version (void)
| Return driver version x.y.z-suffix as a char array. More...
static void | format_u16_data (uint8_t endianness, const uint8_t *in, uint16_t *out)
| Converts two bytes in one unsigned half-word depending on endianness. More...
static void | format_s16_data (uint8_t endianness, const uint8_t *in, int16_t *out)
| Converts two bytes in one signed half-word depending on endianness. More...