| LibDriver MPU9250 1.0.0 MPU9250 full function driver

Macros | Enumerations | Functions
mpu9250 dmp driver function
mpu9250 driver function

mpu9250 dmp driver modules More...

## Macros
#define | MPU9250_DMP_CODE_SIZE 3062
| mpu9250 dmp code definition More...

## Enumerations
enum | mpu9250_dmp_interrupt_mode_t { MPU9250_DMP_INTERRUPT_MODE_CONTINUOUS = 0x00 , MPU9250_DMP_INTERRUPT_MODE_GESTURE = 0x01 }
| mpu9250 dmp interrupt mode enumeration definition More...
enum | mpu9250_dmp_feature_t { MPU9250_DMP_FEATURE_TAP = 0x001 , MPU9250_DMP_FEATURE_ORIENT = 0x002 , MPU9250_DMP_FEATURE_3X_QUAT = 0x004 , MPU9250_DMP_FEATURE_PEDOMETER = 0x008 , MPU9250_DMP_FEATURE_6X_QUAT = 0x010 , MPU9250_DMP_FEATURE_GYRO_CAL = 0x020 , MPU9250_DMP_FEATURE_SEND_RAW_ACCEL = 0x040 , MPU9250_DMP_FEATURE_SEND_RAW_GYRO = 0x080 , MPU9250_DMP_FEATURE_SEND_CAL_GYRO = 0x100 }
| mpu9250 dmp feature enumeration definition More...
enum | mpu9250_dmp_tap_t { MPU9250_DMP_TAP_X_UP = 0x01 , MPU9250_DMP_TAP_X_DOWN = 0x02 , MPU9250_DMP_TAP_Y_UP = 0x03 , MPU9250_DMP_TAP_Y_DOWN = 0x04 , MPU9250_DMP_TAP_Z_UP = 0x05 , MPU9250_DMP_TAP_Z_DOWN = 0x06 }
| mpu9250 dmp tap enumeration definition More...
enum | mpu9250_dmp_orient_t { MPU9250_DMP_ORIENT_PORTRAIT = 0x00 , MPU9250_DMP_ORIENT_LANDSCAPE = 0x01 , MPU9250_DMP_ORIENT_REVERSE_PORTRAIT = 0x02 , MPU9250_DMP_ORIENT_REVERSE_LANDSCAPE = 0x03 }
| mpu9250 dmp orient enumeration definition More...

## Functions
uint8_t | mpu9250_dmp_load_firmware (mpu9250_handle_t *handle)
| load the dmp firmware More...
uint8_t | mpu9250_dmp_set_pedometer_walk_time (mpu9250_handle_t *handle, uint32_t ms)
| dmp set the pedometer walk time More...
uint8_t | mpu9250_dmp_get_pedometer_walk_time (mpu9250_handle_t *handle, uint32_t *ms)
| dmp get the pedometer walk time More...
uint8_t | mpu9250_dmp_set_pedometer_step_count (mpu9250_handle_t *handle, uint32_t count)
| dmp set the pedometer step count More...
uint8_t | mpu9250_dmp_get_pedometer_step_count (mpu9250_handle_t *handle, uint32_t *count)
| dmp get the pedometer step count More...
uint8_t | mpu9250_dmp_set_shake_reject_timeout (mpu9250_handle_t *handle, uint16_t ms)
| dmp set the shake reject timeout More...
uint8_t | mpu9250_dmp_get_shake_reject_timeout (mpu9250_handle_t *handle, uint16_t *ms)
| dmp get the shake reject timeout More...
uint8_t | mpu9250_dmp_set_shake_reject_time (mpu9250_handle_t *handle, uint16_t ms)
| dmp set the shake reject time More...
uint8_t | mpu9250_dmp_get_shake_reject_time (mpu9250_handle_t *handle, uint16_t *ms)
| dmp get the shake reject time More...
uint8_t | mpu9250_dmp_set_shake_reject_thresh (mpu9250_handle_t *handle, uint16_t dps)
| dmp set the shake reject thresh More...
uint8_t | mpu9250_dmp_get_shake_reject_thresh (mpu9250_handle_t *handle, uint16_t *dps)
| dmp get the shake reject thresh More...
uint8_t | mpu9250_dmp_set_tap_time_multi (mpu9250_handle_t *handle, uint16_t ms)
| dmp set max time between taps to register as a multi tap More...
uint8_t | mpu9250_dmp_get_tap_time_multi (mpu9250_handle_t *handle, uint16_t *ms)
| dmp get max time between taps to register as a multi tap More...
uint8_t | mpu9250_dmp_set_tap_time (mpu9250_handle_t *handle, uint16_t ms)
| dmp set the tap time More...
uint8_t | mpu9250_dmp_get_tap_time (mpu9250_handle_t *handle, uint16_t *ms)
| dmp get the tap time More...
uint8_t | mpu9250_dmp_set_min_tap_count (mpu9250_handle_t *handle, uint8_t cnt)
| dmp set the min tap count More...
uint8_t | mpu9250_dmp_get_min_tap_count (mpu9250_handle_t *handle, uint8_t *cnt)
| dmp get the min tap count More...
uint8_t | mpu9250_dmp_set_gyro_calibrate (mpu9250_handle_t *handle, mpu9250_bool_t enable)
| dmp enable or disable gyro calibrate More...
uint8_t | mpu9250_dmp_set_3x_quaternion (mpu9250_handle_t *handle, mpu9250_bool_t enable)
| dmp enable or disable generate 3 axis quaternions from dmp More...
uint8_t | mpu9250_dmp_set_6x_quaternion (mpu9250_handle_t *handle, mpu9250_bool_t enable)
| dmp enable or disable generate 6 axis quaternions from dmp More...
uint8_t | mpu9250_dmp_set_interrupt_mode (mpu9250_handle_t *handle, mpu9250_dmp_interrupt_mode_t mode)
| dmp set the interrupt mode More...
uint8_t | mpu9250_dmp_set_gyro_bias (mpu9250_handle_t *handle, int32_t bias[3])
| dmp set the gyro bias More...
uint8_t | mpu9250_dmp_set_accel_bias (mpu9250_handle_t *handle, int32_t bias[3])
| dmp set the accel bias More...
uint8_t | mpu9250_dmp_set_orientation (mpu9250_handle_t *handle, int8_t mat[9])
| dmp set the orientation More...
uint8_t | mpu9250_dmp_set_feature (mpu9250_handle_t *handle, uint16_t mask)
| dmp enable or disable the dmp feature More...
uint8_t | mpu9250_dmp_set_fifo_rate (mpu9250_handle_t *handle, uint16_t rate)
| dmp set the fifo rate More...
uint8_t | mpu9250_dmp_get_fifo_rate (mpu9250_handle_t *handle, uint16_t *rate)
| dmp get the fifo rate More...
uint8_t | mpu9250_dmp_set_tap_axes (mpu9250_handle_t *handle, mpu9250_axis_t axis, mpu9250_bool_t enable)
| dmp enable or disable the tap axes More...
uint8_t | mpu9250_dmp_get_tap_axes (mpu9250_handle_t *handle, mpu9250_axis_t axis, mpu9250_bool_t *enable)
| dmp get the tap axes status More...
uint8_t | mpu9250_dmp_set_tap_thresh (mpu9250_handle_t *handle, mpu9250_axis_t axis, uint16_t mg_ms)
| dmp set the tap thresh More...
uint8_t | mpu9250_dmp_get_tap_thresh (mpu9250_handle_t *handle, mpu9250_axis_t axis, uint16_t *mg_ms)
| dmp get the tap thresh More...
uint8_t | mpu9250_dmp_read (mpu9250_handle_t *handle, int16_t(*accel_raw)[3], float(*accel_g)[3], int16_t(*gyro_raw)[3], float(*gyro_dps)[3], int32_t(*quat)[4], float *pitch, float *roll, float *yaw, uint16_t *l)
| dmp read the data More...
uint8_t | mpu9250_dmp_set_tap_callback (mpu9250_handle_t *handle, void(*callback)(uint8_t count, uint8_t direction))
| dmp set the tap callback More...
uint8_t | mpu9250_dmp_set_orient_callback (mpu9250_handle_t *handle, void(*callback)(uint8_t orientation))
| dmp set the orient callback More...
uint8_t | mpu9250_dmp_set_enable (mpu9250_handle_t *handle, mpu9250_bool_t enable)
| enable or disable the dmp More...
uint8_t | mpu9250_dmp_gyro_accel_raw_offset_convert (mpu9250_handle_t *handle, int32_t gyro_offset_raw[3], int32_t accel_offset_raw[3], int32_t gyro_offset[3], int32_t accel_offset[3])
| dmp gyro accel raw offset convert More...

## Detailed Description

mpu9250 dmp driver modules

## Macro Definition Documentation

## ◆ MPU9250_DMP_CODE_SIZE

#define MPU9250_DMP_CODE_SIZE 3062

mpu9250 dmp code definition

3062 bytes

Definition at line 56 of file driver_mpu9250_code.h.

## Enumeration Type Documentation

## ◆ mpu9250_dmp_feature_t

enum mpu9250_dmp_feature_t

mpu9250 dmp feature enumeration definition

Enumerator
MPU9250_DMP_FEATURE_TAP | feature tap
MPU9250_DMP_FEATURE_ORIENT | feature orient
MPU9250_DMP_FEATURE_3X_QUAT | feature 3x quat
MPU9250_DMP_FEATURE_PEDOMETER | feature pedometer
MPU9250_DMP_FEATURE_6X_QUAT | feature 6x quat
MPU9250_DMP_FEATURE_GYRO_CAL | feature gyro cal
MPU9250_DMP_FEATURE_SEND_RAW_ACCEL | feature send raw accel
MPU9250_DMP_FEATURE_SEND_RAW_GYRO | feature send raw gyro
MPU9250_DMP_FEATURE_SEND_CAL_GYRO | feature send cal gyro

Definition at line 452 of file driver_mpu9250.h.

## ◆ mpu9250_dmp_interrupt_mode_t

enum mpu9250_dmp_interrupt_mode_t

mpu9250 dmp interrupt mode enumeration definition

Enumerator
MPU9250_DMP_INTERRUPT_MODE_CONTINUOUS | continuous mode
MPU9250_DMP_INTERRUPT_MODE_GESTURE | gesture mode

Definition at line 443 of file driver_mpu9250.h.

## ◆ mpu9250_dmp_orient_t

enum mpu9250_dmp_orient_t

mpu9250 dmp orient enumeration definition

Enumerator
MPU9250_DMP_ORIENT_PORTRAIT | portrait
MPU9250_DMP_ORIENT_LANDSCAPE | landscape
MPU9250_DMP_ORIENT_REVERSE_PORTRAIT | reverse portrait
MPU9250_DMP_ORIENT_REVERSE_LANDSCAPE | reverse landscape

Definition at line 481 of file driver_mpu9250.h.

## ◆ mpu9250_dmp_tap_t

enum mpu9250_dmp_tap_t

mpu9250 dmp tap enumeration definition

Enumerator
MPU9250_DMP_TAP_X_UP | tap x up
MPU9250_DMP_TAP_X_DOWN | tap x down
MPU9250_DMP_TAP_Y_UP | tap y up
MPU9250_DMP_TAP_Y_DOWN | tap y down
MPU9250_DMP_TAP_Z_UP | tap z up
MPU9250_DMP_TAP_Z_DOWN | tap z down

Definition at line 468 of file driver_mpu9250.h.

## Function Documentation

## ◆ mpu9250_dmp_get_fifo_rate()

uint8_t mpu9250_dmp_get_fifo_rate | ( | mpu9250_handle_t * | handle,
|  | uint16_t * | rate
| ) |  |

dmp get the fifo rate

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [out] | *rate | points to a rate buffer

Returns
  status code
  - 0 success
  - 1 dmp get fifo rate failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited

Note
  none

Definition at line 3004 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_get_min_tap_count()

uint8_t mpu9250_dmp_get_min_tap_count | ( | mpu9250_handle_t * | handle,
|  | uint8_t * | cnt
| ) |  |

dmp get the min tap count

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [out] | *cnt | points to a tap counter buffer

Returns
  status code
  - 0 success
  - 1 dmp get min tap count failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited

Note
  none

Definition at line 1869 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_get_pedometer_step_count()

uint8_t mpu9250_dmp_get_pedometer_step_count | ( | mpu9250_handle_t * | handle,
|  | uint32_t * | count
| ) |  |

dmp get the pedometer step count

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [out] | *count | points to a step count buffer

Returns
  status code
  - 0 success
  - 1 dmp get pedometer step count failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited

Note
  none

Definition at line 1307 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_get_pedometer_walk_time()

uint8_t mpu9250_dmp_get_pedometer_walk_time | ( | mpu9250_handle_t * | handle,
|  | uint32_t * | ms
| ) |  |

dmp get the pedometer walk time

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [out] | *ms | points to a walk time buffer

Returns
  status code
  - 0 success
  - 1 dmp get pedometer walk time failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited

Note
  none

Definition at line 1214 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_get_shake_reject_thresh()

uint8_t mpu9250_dmp_get_shake_reject_thresh | ( | mpu9250_handle_t * | handle,
|  | uint16_t * | dps
| ) |  |

dmp get the shake reject thresh

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [out] | *dps | points to a shake reject thresh dps buffer

Returns
  status code
  - 0 success
  - 1 dmp get shake reject thresh failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited

Note
  none

Definition at line 1586 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_get_shake_reject_time()

uint8_t mpu9250_dmp_get_shake_reject_time | ( | mpu9250_handle_t * | handle,
|  | uint16_t * | ms
| ) |  |

dmp get the shake reject time

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [out] | *ms | points to a shake reject time buffer

Returns
  status code
  - 0 success
  - 1 dmp get shake reject time failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited

Note
  none

Definition at line 1491 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_get_shake_reject_timeout()

uint8_t mpu9250_dmp_get_shake_reject_timeout | ( | mpu9250_handle_t * | handle,
|  | uint16_t * | ms
| ) |  |

dmp get the shake reject timeout

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [out] | *ms | points to a reject timeout buffer

Returns
  status code
  - 0 success
  - 1 dmp get shake reject timeout failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited

Note
  none

Definition at line 1399 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_get_tap_axes()

uint8_t mpu9250_dmp_get_tap_axes | ( | mpu9250_handle_t * | handle,
|  | mpu9250_axis_t | axis,
|  | mpu9250_bool_t * | enable
| ) |  |

dmp get the tap axes status

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | axis | is the set axis
  [out] | *enable | points to a bool value buffer

Returns
  status code
  - 0 success
  - 1 dmp get tap axes failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited

Note
  none

Definition at line 3112 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_get_tap_thresh()

uint8_t mpu9250_dmp_get_tap_thresh | ( | mpu9250_handle_t * | handle,
|  | mpu9250_axis_t | axis,
|  | uint16_t * | mg_ms
| ) |  |

dmp get the tap thresh

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | axis | is the set axis
  [out] | *mg_ms | points to an mg/ms thresh buffer

Returns
  status code
  - 0 success
  - 1 dmp get tap thresh failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited
  - 5 invalid axis

Note
  none

Definition at line 3313 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_get_tap_time()

uint8_t mpu9250_dmp_get_tap_time | ( | mpu9250_handle_t * | handle,
|  | uint16_t * | ms
| ) |  |

dmp get the tap time

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [out] | *ms | points to a tap time buffer

Returns
  status code
  - 0 success
  - 1 dmp get tap time failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited

Note
  none

Definition at line 1773 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_get_tap_time_multi()

uint8_t mpu9250_dmp_get_tap_time_multi | ( | mpu9250_handle_t * | handle,
|  | uint16_t * | ms
| ) |  |

dmp get max time between taps to register as a multi tap

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [out] | *ms | points to a delay time buffer

Returns
  status code
  - 0 success
  - 1 dmp get tap time multi failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited

Note
  none

Definition at line 1681 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_gyro_accel_raw_offset_convert()

uint8_t mpu9250_dmp_gyro_accel_raw_offset_convert | ( | mpu9250_handle_t * | handle,
|  | int32_t | gyro_offset_raw[3],
|  | int32_t | accel_offset_raw[3],
|  | int32_t | gyro_offset[3],
|  | int32_t | accel_offset[3]
| ) |  |

dmp gyro accel raw offset convert

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | *gyro_offset_raw | points to a gyro offset raw buffer
  [in] | *accel_offset_raw | points to an accel offset raw buffer
  [out] | *gyro_offset | points to a gyro offset buffer
  [out] | *accel_offset | points to an accel offset buffer

Returns
  status code
  - 0 success
  - 1 dmp set enable failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited

Note
  none

Definition at line 3822 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_load_firmware()

uint8_t mpu9250_dmp_load_firmware | ( | mpu9250_handle_t * | handle | ) |

load the dmp firmware

Parameters

  [in] | *handle | points to an mpu9250 handle structure

Returns
  status code
  - 0 success
  - 1 load firmware failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is running
  - 5 code compare error
  - 6 set program start failed

Note
  none

Definition at line 1087 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_read()

uint8_t mpu9250_dmp_read | ( | mpu9250_handle_t * | handle,
|  | int16_t(*) | accel_raw[3],
|  | float(*) | accel_g[3],
|  | int16_t(*) | gyro_raw[3],
|  | float(*) | gyro_dps[3],
|  | int32_t(*) | quat[4],
|  | float * | pitch,
|  | float * | roll,
|  | float * | yaw,
|  | uint16_t * | l
| ) |  |

dmp read the data

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [out] | *accel_raw | points to an accel raw buffer
  [out] | *accel_g | points to an accel g buffer
  [out] | *gyro_raw | points to a gyro raw buffer
  [out] | *gyro_dps | points to a gyro dps buffer
  [out] | *quat | points to a quat buffer
  [out] | *pitch | points to a pitch buffer
  [out] | *roll | points to a roll buffer
  [out] | *yaw | points to a yaw buffer
  [in,out] | *l | points to a length buffer

Returns
  status code
  - 0 success
  - 1 dmp get fifo rate failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited
  - 5 quat check error
  - 6 fifo overflow
  - 7 fifo data is too little
  - 8 no data

Note
  none

Definition at line 3429 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_set_3x_quaternion()

uint8_t mpu9250_dmp_set_3x_quaternion | ( | mpu9250_handle_t * | handle,
|  | mpu9250_bool_t | enable
| ) |  |

dmp enable or disable generate 3 axis quaternions from dmp

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | enable | is a bool value

Returns
  status code
  - 0 success
  - 1 dmp set 3x quaternion failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited

Note
  none

Definition at line 1976 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_set_6x_quaternion()

uint8_t mpu9250_dmp_set_6x_quaternion | ( | mpu9250_handle_t * | handle,
|  | mpu9250_bool_t | enable
| ) |  |

dmp enable or disable generate 6 axis quaternions from dmp

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | enable | is a bool value

Returns
  status code
  - 0 success
  - 1 dmp set 6x quaternion failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited

Note
  none

Definition at line 2053 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_set_accel_bias()

uint8_t mpu9250_dmp_set_accel_bias | ( | mpu9250_handle_t * | handle,
|  | int32_t | bias[3]
| ) |  |

dmp set the accel bias

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | *bias | points to a bias buffer

Returns
  status code
  - 0 success
  - 1 dmp set accel bias failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited

Note
  none

Definition at line 2289 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_set_enable()

uint8_t mpu9250_dmp_set_enable | ( | mpu9250_handle_t * | handle,
|  | mpu9250_bool_t | enable
| ) |  |

enable or disable the dmp

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | enable | is a bool value

Returns
  status code
  - 0 success
  - 1 dmp set enable failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited

Note
  none

Definition at line 3767 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_set_feature()

uint8_t mpu9250_dmp_set_feature | ( | mpu9250_handle_t * | handle,
|  | uint16_t | mask
| ) |  |

dmp enable or disable the dmp feature

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | mask | is the set mask

Returns
  status code
  - 0 success
  - 1 dmp set feature failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited

Note
  mask can be MPU9250_DMP_FEATURE_TAP, MPU9250_DMP_FEATURE_ORIENT MPU9250_DMP_FEATURE_3X_QUAT, MPU9250_DMP_FEATURE_PEDOMETER MPU9250_DMP_FEATURE_6X_QUAT, MPU9250_DMP_FEATURE_GYRO_CAL MPU9250_DMP_FEATURE_SEND_RAW_ACCEL, MPU9250_DMP_FEATURE_SEND_RAW_GYRO MPU9250_DMP_FEATURE_SEND_CAL_GYRO or combination

Definition at line 2496 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_set_fifo_rate()

uint8_t mpu9250_dmp_set_fifo_rate | ( | mpu9250_handle_t * | handle,
|  | uint16_t | rate
| ) |  |

dmp set the fifo rate

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | rate | is the set rate

Returns
  status code
  - 0 success
  - 1 dmp set fifo rate failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited
  - 5 rate > 200

Note
  none

Definition at line 2938 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_set_gyro_bias()

uint8_t mpu9250_dmp_set_gyro_bias | ( | mpu9250_handle_t * | handle,
|  | int32_t | bias[3]
| ) |  |

dmp set the gyro bias

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | *bias | points to a bias buffer

Returns
  status code
  - 0 success
  - 1 dmp set gyro bias failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited

Note
  none

Definition at line 2199 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_set_gyro_calibrate()

uint8_t mpu9250_dmp_set_gyro_calibrate | ( | mpu9250_handle_t * | handle,
|  | mpu9250_bool_t | enable
| ) |  |

dmp enable or disable gyro calibrate

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | enable | is a bool value

Returns
  status code
  - 0 success
  - 1 dmp set gyro calibrate failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited

Note
  none

Definition at line 1913 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_set_interrupt_mode()

uint8_t mpu9250_dmp_set_interrupt_mode | ( | mpu9250_handle_t * | handle,
|  | mpu9250_dmp_interrupt_mode_t | mode
| ) |  |

dmp set the interrupt mode

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | mode | is the dmp interrupt mode

Returns
  status code
  - 0 success
  - 1 dmp set interrupt mode failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited

Note
  none

Definition at line 2130 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_set_min_tap_count()

uint8_t mpu9250_dmp_set_min_tap_count | ( | mpu9250_handle_t * | handle,
|  | uint8_t | cnt
| ) |  |

dmp set the min tap count

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | cnt | is the tap counter

Returns
  status code
  - 0 success
  - 1 dmp set min tap count failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited
  - 5 cnt must be between 1 and 4

Note
  1 <= cnt <= 4

Definition at line 1819 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_set_orient_callback()

uint8_t mpu9250_dmp_set_orient_callback | ( | mpu9250_handle_t * | handle,
|  | void(*)(uint8_t orientation) | callback
| ) |  |

dmp set the orient callback

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | *callback | points to a callback function address

Returns
  status code
  - 0 success
  - 1 dmp set orient callback failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited

Note
  none

Definition at line 3733 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_set_orientation()

uint8_t mpu9250_dmp_set_orientation | ( | mpu9250_handle_t * | handle,
|  | int8_t | mat[9]
| ) |  |

dmp set the orientation

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | *mat | points to an orientation matrix buffer

Returns
  status code
  - 0 success
  - 1 dmp set orientation failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited

Note
  none

Definition at line 2392 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_set_pedometer_step_count()

uint8_t mpu9250_dmp_set_pedometer_step_count | ( | mpu9250_handle_t * | handle,
|  | uint32_t | count
| ) |  |

dmp set the pedometer step count

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | count | is the step count

Returns
  status code
  - 0 success
  - 1 dmp set pedometer step count failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited

Note
  none

Definition at line 1259 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_set_pedometer_walk_time()

uint8_t mpu9250_dmp_set_pedometer_walk_time | ( | mpu9250_handle_t * | handle,
|  | uint32_t | ms
| ) |  |

dmp set the pedometer walk time

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | ms | is the walk time

Returns
  status code
  - 0 success
  - 1 dmp set pedometer walk time failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited

Note
  none

Definition at line 1165 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_set_shake_reject_thresh()

uint8_t mpu9250_dmp_set_shake_reject_thresh | ( | mpu9250_handle_t * | handle,
|  | uint16_t | dps
| ) |  |

dmp set the shake reject thresh

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | dps | is the shake reject thresh

Returns
  status code
  - 0 success
  - 1 dmp set shake reject thresh failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited

Note
  none

Definition at line 1536 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_set_shake_reject_time()

uint8_t mpu9250_dmp_set_shake_reject_time | ( | mpu9250_handle_t * | handle,
|  | uint16_t | ms
| ) |  |

dmp set the shake reject time

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | ms | is the shake reject time

Returns
  status code
  - 0 success
  - 1 dmp set shake reject time failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited

Note
  none

Definition at line 1444 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_set_shake_reject_timeout()

uint8_t mpu9250_dmp_set_shake_reject_timeout | ( | mpu9250_handle_t * | handle,
|  | uint16_t | ms
| ) |  |

dmp set the shake reject timeout

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | ms | is the reject timeout

Returns
  status code
  - 0 success
  - 1 dmp set shake reject timeout failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited

Note
  none

Definition at line 1352 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_set_tap_axes()

uint8_t mpu9250_dmp_set_tap_axes | ( | mpu9250_handle_t * | handle,
|  | mpu9250_axis_t | axis,
|  | mpu9250_bool_t | enable
| ) |  |

dmp enable or disable the tap axes

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | axis | is the set axis
  [in] | enable | is a bool value

Returns
  status code
  - 0 success
  - 1 dmp set tap axes failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited

Note
  none

Definition at line 3051 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_set_tap_callback()

uint8_t mpu9250_dmp_set_tap_callback | ( | mpu9250_handle_t * | handle,
|  | void(*)(uint8_t count, uint8_t direction) | callback
| ) |  |

dmp set the tap callback

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | *callback | points to a callback function address

Returns
  status code
  - 0 success
  - 1 dmp set tap callback failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited

Note
  none

Definition at line 3699 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_set_tap_thresh()

uint8_t mpu9250_dmp_set_tap_thresh | ( | mpu9250_handle_t * | handle,
|  | mpu9250_axis_t | axis,
|  | uint16_t | mg_ms
| ) |  |

dmp set the tap thresh

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | axis | is the set axis
  [in] | mg_ms | is the set thresh

Returns
  status code
  - 0 success
  - 1 dmp set tap thresh failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited
  - 5 mg/ms > 1600
  - 6 invalid axis

Note
  none

Definition at line 3168 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_set_tap_time()

uint8_t mpu9250_dmp_set_tap_time | ( | mpu9250_handle_t * | handle,
|  | uint16_t | ms
| ) |  |

dmp set the tap time

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | ms | is the tap time

Returns
  status code
  - 0 success
  - 1 dmp set tap time failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited

Note
  none

Definition at line 1726 of file driver_mpu9250.c.

## ◆ mpu9250_dmp_set_tap_time_multi()

uint8_t mpu9250_dmp_set_tap_time_multi | ( | mpu9250_handle_t * | handle,
|  | uint16_t | ms
| ) |  |

dmp set max time between taps to register as a multi tap

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | ms | is the delay time

Returns
  status code
  - 0 success
  - 1 dmp set tap time multi failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 dmp is not inited

Note
  none

Definition at line 1634 of file driver_mpu9250.c.