| ICM-4268x-V Driver API 1.0.1 ICM-4268x-V Driver API

Classes | Macros | Enumerations | Functions
Icm426xxDriver_HL.h File Reference
Icm426xx driver high level functions

High-level function to setup an Icm426xx device. More...

`#include "Invn/Drivers/Icm426xx/Icm426xxDefs.h"`
`#include "Invn/Drivers/Icm426xx/Icm426xxTransport.h"`
`#include "Invn/InvError.h"`
`#include <stdint.h>`
`#include <string.h>`
Include dependency graph for Icm426xxDriver_HL.h:

Go to the source code of this file.

## Classes
struct | inv_icm426xx_sensor_event_t
| Sensor event structure definition. More...
struct | inv_icm426xx
| Icm426xx driver states definition. More...
struct | inv_icm426xx_interrupt_parameter_t
| Icm426xx set of interrupt enable flag. More...

## Macros
#define | INV_ICM426XX_LIGHTWEIGHT_DRIVER 0
| Lighten driver logic by stripping out procedures on transitions. More...
#define | PLL_SCALE_FACTOR_Q24 (1UL<<24)
| Scale factor and max ODR Dependant of chip.
#define | ACCEL_CONFIG0_FS_SEL_MAX ICM426XX_ACCEL_CONFIG0_FS_SEL_16g
| Max FSR values for accel and gyro Dependant of chip.
#define | RTC_SUPPORTED 0
| RTC Support flag Define whether the RTC mode is supported Dependant of chip.
#define | ICM426XX_FIFO_MIRRORING_SIZE 16 * 129
| Icm426xx maximum buffer size mirrored from FIFO at polling time. More...
#define | ICM426XX_DEFAULT_WOM_THS_MG 52>>2 /* = 52mg/4 */
| Default value for the WOM threshold Resolution of the threshold is ~= 4mg.
#define | ICM426XX_ACC_STARTUP_TIME_US 20000U
| Icm426xx Accelerometer start-up time before having correct data.
#define | ICM426XX_GYR_STARTUP_TIME_US 60000U
| Icm426xx Gyroscope start-up time before having correct data.

## Enumerations
enum | inv_icm426xx_sensor { INV_ICM426XX_SENSOR_ACCEL , INV_ICM426XX_SENSOR_GYRO , INV_ICM426XX_SENSOR_FSYNC_EVENT , INV_ICM426XX_SENSOR_OIS , INV_ICM426XX_SENSOR_TEMPERATURE , INV_ICM426XX_SENSOR_TAP , INV_ICM426XX_SENSOR_DMP_PEDOMETER_EVENT , INV_ICM426XX_SENSOR_DMP_PEDOMETER_COUNT , INV_ICM426XX_SENSOR_DMP_TILT , INV_ICM426XX_SENSOR_MAX }
| Sensor identifier for UI control and OIS function. More...
enum | INV_ICM426XX_FIFO_CONFIG_t { INV_ICM426XX_FIFO_DISABLED = 0 , INV_ICM426XX_FIFO_ENABLED = 1 }
| Configure Fifo usage. More...

## Functions
int | inv_icm426xx_set_reg_bank (struct inv_icm426xx *s, uint8_t bank)
| Set register bank index. More...
int | inv_icm426xx_init (struct inv_icm426xx *s, struct inv_icm426xx_serif *serif, void(*sensor_event_cb)(inv_icm426xx_sensor_event_t *event))
| Configure the serial interface used to access the device and execute hardware initialization. More...
int | inv_icm426xx_device_reset (struct inv_icm426xx *s)
| Perform a soft reset of the device. More...
int | inv_icm426xx_get_who_am_i (struct inv_icm426xx *s, uint8_t *who_am_i)
| return WHOAMI value More...
int | inv_icm426xx_force_clock_source (struct inv_icm426xx *s, ICM426XX_INTF_CONFIG1_ACCEL_LP_CLK_t clk_src)
| Configure Accel clock source. More...
int | inv_icm426xx_enable_accel_low_power_mode (struct inv_icm426xx *s)
| Enable/put accel in low power mode. More...
int | inv_icm426xx_enable_accel_low_noise_mode (struct inv_icm426xx *s)
| Enable/put accel in low noise mode. More...
int | inv_icm426xx_disable_accel (struct inv_icm426xx *s)
| Disable all 3 axes of accel. More...
int | inv_icm426xx_enable_gyro_low_noise_mode (struct inv_icm426xx *s)
| Enable/put gyro in low noise mode. More...
int | inv_icm426xx_disable_gyro (struct inv_icm426xx *s)
| Disable all 3 axes of gyro. More...
int | inv_icm426xx_enable_fsync (struct inv_icm426xx *s)
| Enable fsync tagging functionality. More...
int | inv_icm426xx_disable_fsync (struct inv_icm426xx *s)
| Disable fsync tagging functionality. More...
int | inv_icm426xx_configure_timestamp_resolution (struct inv_icm426xx *s, ICM426XX_TMST_CONFIG_RESOL_t resol)
| Configure timestamp resolution from FIFO. More...
int | inv_icm426xx_set_config_ibi (struct inv_icm426xx *s, inv_icm426xx_interrupt_parameter_t *interrupt_to_configure)
| Configure which interrupt source can trigger ibi interruptions. More...
int | inv_icm426xx_get_config_ibi (struct inv_icm426xx *s, inv_icm426xx_interrupt_parameter_t *interrupt_to_configure)
| Retrieve interrupts configuration. More...
int | inv_icm426xx_set_config_int1 (struct inv_icm426xx *s, inv_icm426xx_interrupt_parameter_t *interrupt_to_configure)
| Configure which interrupt source can trigger INT1. More...
int | inv_icm426xx_get_config_int1 (struct inv_icm426xx *s, inv_icm426xx_interrupt_parameter_t *interrupt_to_configure)
| Retrieve interrupts configuration. More...
int | inv_icm426xx_set_config_int2 (struct inv_icm426xx *s, inv_icm426xx_interrupt_parameter_t *interrupt_to_configure)
| Configure which interrupt source can trigger INT2. More...
int | inv_icm426xx_get_config_int2 (struct inv_icm426xx *s, inv_icm426xx_interrupt_parameter_t *interrupt_to_configure)
| Retrieve interrupts configuration. More...
int | inv_icm426xx_get_data_from_registers (struct inv_icm426xx *s)
| Read all registers containing data (temperature, accelerometer and gyroscope). More...
int | inv_icm426xx_get_data_from_fifo (struct inv_icm426xx *s)
| Read all available packets from the FIFO. More...
uint32_t | inv_icm426xx_convert_odr_bitfield_to_us (uint32_t odr_bitfield)
| Converts ICM426XX_ACCEL_CONFIG0_ODR_t or ICM426XX_GYRO_CONFIG0_ODR_t enums to period expressed in us. More...
int | inv_icm426xx_set_accel_frequency (struct inv_icm426xx *s, const ICM426XX_ACCEL_CONFIG0_ODR_t frequency)
| Configure accel Output Data Rate. More...
int | inv_icm426xx_set_gyro_frequency (struct inv_icm426xx *s, const ICM426XX_GYRO_CONFIG0_ODR_t frequency)
| Configure gyro Output Data Rate. More...
int | inv_icm426xx_set_accel_fsr (struct inv_icm426xx *s, ICM426XX_ACCEL_CONFIG0_FS_SEL_t accel_fsr_g)
| Set accel full scale range. More...
int | inv_icm426xx_get_accel_fsr (struct inv_icm426xx *s, ICM426XX_ACCEL_CONFIG0_FS_SEL_t *accel_fsr_g)
| Access accel full scale range. More...
int | inv_icm426xx_set_gyro_fsr (struct inv_icm426xx *s, ICM426XX_GYRO_CONFIG0_FS_SEL_t gyro_fsr_dps)
| Set gyro full scale range. More...
int | inv_icm426xx_get_gyro_fsr (struct inv_icm426xx *s, ICM426XX_GYRO_CONFIG0_FS_SEL_t *gyro_fsr_dps)
| Access gyro full scale range. More...
int | inv_icm426xx_set_accel_lp_avg (struct inv_icm426xx *s, ICM426XX_GYRO_ACCEL_CONFIG0_ACCEL_FILT_AVG_t acc_avg)
| Set accel Low-Power averaging value. More...
int | inv_icm426xx_set_accel_ln_bw (struct inv_icm426xx *s, ICM426XX_GYRO_ACCEL_CONFIG0_ACCEL_FILT_BW_t acc_bw)
| Set accel Low-Noise bandwidth value. More...
int | inv_icm426xx_set_gyro_ln_bw (struct inv_icm426xx *s, ICM426XX_GYRO_ACCEL_CONFIG0_GYRO_FILT_BW_t gyr_bw)
| Set gyro Low-Noise bandwidth value. More...
int | inv_icm426xx_reset_fifo (struct inv_icm426xx *s)
| reset ICM426XX fifo More...
int | inv_icm426xx_enable_timestamp_to_register (struct inv_icm426xx *s)
| Enable the 20bits-timestamp register access to read in a reliable way the strobed timestamp. More...
int | inv_icm426xx_disable_timestamp_to_register (struct inv_icm426xx *s)
| Disable the 20bits-timestamp register access. More...
int | inv_icm426xx_get_current_timestamp (struct inv_icm426xx *s, uint32_t *icm_time)
| Get the timestamp value of icm426xx from register. More...
int | inv_icm426xx_enable_clkin_rtc (struct inv_icm426xx *s, uint8_t enable)
| Enable or disable CLKIN/RTC capability. More...
int | inv_icm426xx_get_clkin_rtc_status (struct inv_icm426xx *s)
| Get CLKIN/RTC feature status. More...
int | inv_icm426xx_enable_high_resolution_fifo (struct inv_icm426xx *s)
| Enable 20 bits raw acc and raw gyr data in fifo. More...
int | inv_icm426xx_disable_high_resolution_fifo (struct inv_icm426xx *s)
| Disable 20 bits raw acc and raw gyr data in fifo. More...
int | inv_icm426xx_configure_fifo (struct inv_icm426xx *s, INV_ICM426XX_FIFO_CONFIG_t fifo_config)
| Configure Fifo to select the way data are gathered. More...
int | inv_icm426xx_configure_fifo_wm (struct inv_icm426xx *s, uint16_t wm)
| Configure Fifo watermark (also referred to as fifo threshold) More...
uint32_t | inv_icm426xx_get_fifo_timestamp_resolution_us_q24 (struct inv_icm426xx *s)
| Get FIFO timestamp resolution. More...
uint32_t | inv_icm426xx_get_reg_timestamp_resolution_us_q24 (struct inv_icm426xx *s)
| Get register timestamp resolution. More...
const char * | inv_icm426xx_get_version (void)
| Return driver version x.y.z-suffix as a char array. More...

## Detailed Description

High-level function to setup an Icm426xx device.