| ICM42605 eMD Driver 2.0.9 Documentation of the eMD Driver API

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

Files | Classes | Macros | Typedefs | Functions
Transport

Abstraction layer to communicate with device. More...

## Files
file | Icm426xxTransport.h

## Classes
struct | inv_icm426xx_serif
| base sensor serial interface More...
struct | inv_icm426xx_transport
| transport interface More...

## Macros
#define | ICM426XX_UI_I2C 0
| identifies I2C interface. More...
#define | ICM426XX_UI_SPI4 1
| identifies 4-wire SPI interface. More...
#define | ICM426XX_UI_I3C 2
| identifies I3C interface. More...
#define | ICM426XX_AUX1_SPI3 3
| identifies 3-wire SPI interface for AUX1. More...
#define | ICM426XX_AUX2_SPI3 4
| identifies 3-wire SPI interface for AUX2. More...
#define | ICM426XX_AUX1_SPI4 5
| identifies 4-wire SPI interface for AUX1. More...

## Typedefs
typedef uint32_t | ICM426XX_SERIAL_IF_TYPE_t
| Serif type definition. More...

## Functions
int | inv_icm426xx_init_transport (struct inv_icm426xx *s)
| Init cache variable. More...
int | inv_icm426xx_read_reg (struct inv_icm426xx *s, uint8_t reg, uint32_t len, uint8_t *buf)
| Reads data from a register on Icm426xx. More...
int | inv_icm426xx_write_reg (struct inv_icm426xx *s, uint8_t reg, uint32_t len, const uint8_t *buf)
| Writes data to a register on Icm426xx. More...

## Detailed Description

Abstraction layer to communicate with device.

## Macro Definition Documentation

## ◆ ICM426XX_AUX1_SPI3

#define ICM426XX_AUX1_SPI3 3

identifies 3-wire SPI interface for AUX1.

## ◆ ICM426XX_AUX1_SPI4

#define ICM426XX_AUX1_SPI4 5

identifies 4-wire SPI interface for AUX1.

## ◆ ICM426XX_AUX2_SPI3

#define ICM426XX_AUX2_SPI3 4

identifies 3-wire SPI interface for AUX2.

## ◆ ICM426XX_UI_I2C

#define ICM426XX_UI_I2C 0

identifies I2C interface.

## ◆ ICM426XX_UI_I3C

#define ICM426XX_UI_I3C 2

identifies I3C interface.

## ◆ ICM426XX_UI_SPI4

#define ICM426XX_UI_SPI4 1

identifies 4-wire SPI interface.

## Typedef Documentation

## ◆ ICM426XX_SERIAL_IF_TYPE_t

typedef uint32_t ICM426XX_SERIAL_IF_TYPE_t

Serif type definition.

Deprecated:
  Kept for retrocompatibility. Replaced with `uint32_t` type in `struct inv_icm426xx_serif` struct.

## Function Documentation

## ◆ inv_icm426xx_init_transport()

int inv_icm426xx_init_transport | ( | struct inv_icm426xx * | s | ) |

Init cache variable.

Returns
  0 in case of success, -1 for any error

## ◆ inv_icm426xx_read_reg()

int inv_icm426xx_read_reg | ( | struct inv_icm426xx * | s,
|  | uint8_t | reg,
|  | uint32_t | len,
|  | uint8_t * | buf
| ) |  |

Reads data from a register on Icm426xx.

Parameters

  [in] | s | Pointer to device.
  [in] | reg | register address to be read
  [in] | len | number of byte to be read
  [out] | buf | output data from the register

Returns
  0 in case of success, -1 for any error

## ◆ inv_icm426xx_write_reg()

int inv_icm426xx_write_reg | ( | struct inv_icm426xx * | s,
|  | uint8_t | reg,
|  | uint32_t | len,
|  | const uint8_t * | buf
| ) |  |

Writes data to a register on Icm426xx.

Parameters

  [in] | s | Pointer to device.
  [in] | reg | register address to be written
  [in] | len | number of byte to be written
  [in] | buf | input data to write

Returns
  0 in case of success, -1 for any error