| ICM40609D eMD Driver 2.0.0 Documentation of the eMD Driver API

- Main Page
- Modules
- Classes
- Files

Files | Functions
Icm406xx driver high level functions to use ois (AUX)

High-level function to setup an Icm406xx OIS. More...

## Files
file | Icm406xxDriver_HL_ois.h
| High-level function to setup an Icm406xx OIS.

## Functions
int | inv_icm406xx_init_ois (struct inv_icm406xx *s, struct inv_icm406xx_serif *serif)
| Configure the serial interface used to access the device and execute hardware initialization. More...
int | inv_icm406xx_get_who_am_i_ois (struct inv_icm406xx *s, uint8_t *who_am_i)
| return WHOAMI value More...
int | inv_icm406xx_enable_ois1 (struct inv_icm406xx *s)
| Enable gyrometer on auxiliary path 1. More...
int | inv_icm406xx_disable_ois1 (struct inv_icm406xx *s)
| Disable gyrometer on auxiliary path 1. More...
int | inv_icm406xx_enable_ois2 (struct inv_icm406xx *s)
| Enable gyrometer on auxiliary path 2. More...
int | inv_icm406xx_disable_ois2 (struct inv_icm406xx *s)
| Disable gyrometer on auxiliary path 2. More...
int | inv_icm406xx_set_gyro_fsr_ois1 (struct inv_icm406xx *s, ICM406XX_OIS1_CONFIG2_GYRO_FS_SEL_t gyro_fsr_dps)
| Set gyro full scale range on auxiliary path 1. More...
int | inv_icm406xx_set_gyro_fsr_ois2 (struct inv_icm406xx *s, ICM406XX_OIS2_CONFIG2_GYRO_FS_SEL_t gyro_fsr_dps)
| Set gyro full scale range on auxiliary path 2. More...
int | inv_icm406xx_set_ois1_frequency (struct inv_icm406xx *s, const ICM406XX_OIS1_CONFIG1_DEC_t decimator)
| Configure OIS Output Data Rate on auxiliary path 1. More...
int | inv_icm406xx_set_ois2_frequency (struct inv_icm406xx *s, const ICM406XX_OIS2_CONFIG1_DEC_t decimator)
| Configure OIS Output Data Rate on auxiliary path 2. More...
int | inv_icm406xx_get_data_ois1 (struct inv_icm406xx *s, int16_t gyro_data[3])
| Get gyrometer data from auxiliary path 1. More...
int | inv_icm406xx_get_data_ois2 (struct inv_icm406xx *s, int16_t gyro_data[3])
| Get gyrometer data from auxiliary path 2. More...

## Detailed Description

High-level function to setup an Icm406xx OIS.

## Function Documentation

## ◆ inv_icm406xx_disable_ois1()

int inv_icm406xx_disable_ois1 | ( | struct inv_icm406xx * | s | ) |

Disable gyrometer on auxiliary path 1.

Returns
  0 on success, negative value on error.

## ◆ inv_icm406xx_disable_ois2()

int inv_icm406xx_disable_ois2 | ( | struct inv_icm406xx * | s | ) |

Disable gyrometer on auxiliary path 2.

Returns
  0 on success, negative value on error.

## ◆ inv_icm406xx_enable_ois1()

int inv_icm406xx_enable_ois1 | ( | struct inv_icm406xx * | s | ) |

Enable gyrometer on auxiliary path 1.

Note this API fits with main OIS scenario meaning OIS with gyro data only. It does not allow to enable accelerometer data on auxiliary pathes. To do so refer to low-level API in Icm406xxDriver.c.

Returns
  0 on success, negative value on error.

## ◆ inv_icm406xx_enable_ois2()

int inv_icm406xx_enable_ois2 | ( | struct inv_icm406xx * | s | ) |

Enable gyrometer on auxiliary path 2.

Note this API fits with main OIS scenario meaning OIS with gyro data only. It does not allow to enable accelerometer data on auxiliary pathes. To do so refer to low-level API in Icm406xxDriver.c.

Returns
  0 on success, negative value on error.

## ◆ inv_icm406xx_get_data_ois1()

int inv_icm406xx_get_data_ois1 | ( | struct inv_icm406xx * | s,
|  | int16_t | gyro_data[3]
| ) |  |

Get gyrometer data from auxiliary path 1.

Returns
  0 on success, negative value on error or on invalid data.

## ◆ inv_icm406xx_get_data_ois2()

int inv_icm406xx_get_data_ois2 | ( | struct inv_icm406xx * | s,
|  | int16_t | gyro_data[3]
| ) |  |

Get gyrometer data from auxiliary path 2.

Returns
  0 on success, negative value on error or on invalid data.

## ◆ inv_icm406xx_get_who_am_i_ois()

int inv_icm406xx_get_who_am_i_ois | ( | struct inv_icm406xx * | s,
|  | uint8_t * | who_am_i
| ) |  |

return WHOAMI value

Parameters

  [out] | who_am_i | WHOAMI for device

Returns
  0 on success, negative value on error

## ◆ inv_icm406xx_init_ois()

int inv_icm406xx_init_ois | ( | struct inv_icm406xx * | s,
|  | struct inv_icm406xx_serif * | serif
| ) |  |

Configure the serial interface used to access the device and execute hardware initialization.

This functions first configures serial interface passed in parameter to make sure device is accessible both in read and write. Thus no serial access should be done before succesfully executing the present function.

In case requested serial interface is an auxliary interface (i.e. AUX1) this function does not perform any hardware initialization as write accesses are restricted from auxiliary ports. Hardware should then be initialized through primary interface prior to using auxiliary interface.

Parameters

  [in] | s | driver structure. Note that first field of this structure MUST be a struct inv_icm406xx_serif.
  [in] | serif | pointer on serial interface structure to be used to access icm406xx.

Returns
  0 on success, negative value on error.

## ◆ inv_icm406xx_set_gyro_fsr_ois1()

int inv_icm406xx_set_gyro_fsr_ois1 | ( | struct inv_icm406xx * | s,
|  | ICM406XX_OIS1_CONFIG2_GYRO_FS_SEL_t | gyro_fsr_dps
| ) |  |

Set gyro full scale range on auxiliary path 1.

Parameters

  [in] | gyro_fsr_dps | requested full scale range. See

See also
  ICM406XX_OIS1_CONFIG2_GYRO_FS_SEL_t.

Returns
  0 on success, negative value on error.

## ◆ inv_icm406xx_set_gyro_fsr_ois2()

int inv_icm406xx_set_gyro_fsr_ois2 | ( | struct inv_icm406xx * | s,
|  | ICM406XX_OIS2_CONFIG2_GYRO_FS_SEL_t | gyro_fsr_dps
| ) |  |

Set gyro full scale range on auxiliary path 2.

Parameters

  [in] | gyro_fsr_dps | requested full scale range. See

See also
  ICM406XX_OIS2_CONFIG2_GYRO_FS_SEL_t.

Returns
  0 on success, negative value on error.

## ◆ inv_icm406xx_set_ois1_frequency()

int inv_icm406xx_set_ois1_frequency | ( | struct inv_icm406xx * | s,
|  | const ICM406XX_OIS1_CONFIG1_DEC_t | decimator
| ) |  |

Configure OIS Output Data Rate on auxiliary path 1.

Parameters

  [in] | frequency | The requested decimation factor based on maximum OIS frequency allowed for current chip. See

See also
  ICM406XX_OIS1_CONFIG1_DEC_t

Returns
  0 on success, negative value on error.

## ◆ inv_icm406xx_set_ois2_frequency()

int inv_icm406xx_set_ois2_frequency | ( | struct inv_icm406xx * | s,
|  | const ICM406XX_OIS2_CONFIG1_DEC_t | decimator
| ) |  |

Configure OIS Output Data Rate on auxiliary path 2.

Parameters

  [in] | frequency | The requested decimation factor based on maximum OIS frequency allowed for current chip. See

See also
  ICM406XX_OIS2_CONFIG1_DEC_t

Returns
  0 on success, negative value on error.