| LibDriver MPU9250 1.0.0 MPU9250 full function driver

Functions
mpu9250 interface driver function
mpu9250 driver function

mpu9250 interface driver modules More...

## Functions
uint8_t | mpu9250_interface_iic_init (void)
| interface iic bus init More...
uint8_t | mpu9250_interface_iic_deinit (void)
| interface iic bus deinit More...
uint8_t | mpu9250_interface_iic_read (uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
| interface iic bus read More...
uint8_t | mpu9250_interface_iic_write (uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
| interface iic bus write More...
uint8_t | mpu9250_interface_spi_init (void)
| interface spi bus init More...
uint8_t | mpu9250_interface_spi_deinit (void)
| interface spi bus deinit More...
uint8_t | mpu9250_interface_spi_read (uint8_t reg, uint8_t *buf, uint16_t len)
| interface spi bus read More...
uint8_t | mpu9250_interface_spi_write (uint8_t reg, uint8_t *buf, uint16_t len)
| interface spi bus write More...
void | mpu9250_interface_delay_ms (uint32_t ms)
| interface delay ms More...
void | mpu9250_interface_debug_print (const char *const fmt,...)
| interface print format data More...
void | mpu9250_interface_receive_callback (uint8_t type)
| interface receive callback More...
void | mpu9250_interface_dmp_tap_callback (uint8_t count, uint8_t direction)
| interface dmp tap callback More...
void | mpu9250_interface_dmp_orient_callback (uint8_t orientation)
| interface dmp orient callback More...

## Detailed Description

mpu9250 interface driver modules

## Function Documentation

## ◆ mpu9250_interface_debug_print()

void mpu9250_interface_debug_print | ( | const char *const | fmt,
|  |  | ...
| ) |  |

interface print format data

Parameters

  [in] | fmt | is the format data

Note
  none

Definition at line 164 of file driver_mpu9250_interface_template.c.

## ◆ mpu9250_interface_delay_ms()

void mpu9250_interface_delay_ms | ( | uint32_t | ms | ) |

interface delay ms

Parameters

  [in] | ms |

Note
  none

Definition at line 154 of file driver_mpu9250_interface_template.c.

## ◆ mpu9250_interface_dmp_orient_callback()

void mpu9250_interface_dmp_orient_callback | ( | uint8_t | orientation | ) |

interface dmp orient callback

Parameters

  [in] | orientation | is the dmp orientation

Note
  none

Definition at line 277 of file driver_mpu9250_interface_template.c.

## ◆ mpu9250_interface_dmp_tap_callback()

void mpu9250_interface_dmp_tap_callback | ( | uint8_t | count,
|  | uint8_t | direction
| ) |  |

interface dmp tap callback

Parameters

  [in] | count | is the tap count
  [in] | direction | is the tap direction

Note
  none

Definition at line 223 of file driver_mpu9250_interface_template.c.

## ◆ mpu9250_interface_iic_deinit()

uint8_t mpu9250_interface_iic_deinit | ( | void |  | ) |

interface iic bus deinit

Returns
  status code
  - 0 success
  - 1 iic deinit failed

Note
  none

Definition at line 58 of file driver_mpu9250_interface_template.c.

## ◆ mpu9250_interface_iic_init()

uint8_t mpu9250_interface_iic_init | ( | void |  | ) |

interface iic bus init

Returns
  status code
  - 0 success
  - 1 iic init failed

Note
  none

Definition at line 46 of file driver_mpu9250_interface_template.c.

## ◆ mpu9250_interface_iic_read()

uint8_t mpu9250_interface_iic_read | ( | uint8_t | addr,
|  | uint8_t | reg,
|  | uint8_t * | buf,
|  | uint16_t | len
| ) |  |

interface iic bus read

Parameters

  [in] | addr | is the iic device write address
  [in] | reg | is the iic register address
  [out] | *buf | points to a data buffer
  [in] | len | is the length of the data buffer

Returns
  status code
  - 0 success
  - 1 read failed

Note
  none

Definition at line 74 of file driver_mpu9250_interface_template.c.

## ◆ mpu9250_interface_iic_write()

uint8_t mpu9250_interface_iic_write | ( | uint8_t | addr,
|  | uint8_t | reg,
|  | uint8_t * | buf,
|  | uint16_t | len
| ) |  |

interface iic bus write

Parameters

  [in] | addr | is the iic device write address
  [in] | reg | is the iic register address
  [in] | *buf | points to a data buffer
  [in] | len | is the length of the data buffer

Returns
  status code
  - 0 success
  - 1 write failed

Note
  none

Definition at line 90 of file driver_mpu9250_interface_template.c.

## ◆ mpu9250_interface_receive_callback()

void mpu9250_interface_receive_callback | ( | uint8_t | type | ) |

interface receive callback

Parameters

  [in] | type | is the irq type

Note
  none

Definition at line 174 of file driver_mpu9250_interface_template.c.

## ◆ mpu9250_interface_spi_deinit()

uint8_t mpu9250_interface_spi_deinit | ( | void |  | ) |

interface spi bus deinit

Returns
  status code
  - 0 success
  - 1 spi deinit failed

Note
  none

Definition at line 114 of file driver_mpu9250_interface_template.c.

## ◆ mpu9250_interface_spi_init()

uint8_t mpu9250_interface_spi_init | ( | void |  | ) |

interface spi bus init

Returns
  status code
  - 0 success
  - 1 spi init failed

Note
  none

Definition at line 102 of file driver_mpu9250_interface_template.c.

## ◆ mpu9250_interface_spi_read()

uint8_t mpu9250_interface_spi_read | ( | uint8_t | reg,
|  | uint8_t * | buf,
|  | uint16_t | len
| ) |  |

interface spi bus read

Parameters

  [in] | reg | is the register address
  [out] | *buf | points to a data buffer
  [in] | len | is the length of data buffer

Returns
  status code
  - 0 success
  - 1 read failed

Note
  none

Definition at line 129 of file driver_mpu9250_interface_template.c.

## ◆ mpu9250_interface_spi_write()

uint8_t mpu9250_interface_spi_write | ( | uint8_t | reg,
|  | uint8_t * | buf,
|  | uint16_t | len
| ) |  |

interface spi bus write

Parameters

  [in] | reg | is the register address
  [in] | *buf | points to a data buffer
  [in] | len | is the length of data buffer

Returns
  status code
  - 0 success
  - 1 write failed

Note
  none

Definition at line 144 of file driver_mpu9250_interface_template.c.