| LibDriver MPU9250 1.0.0 MPU9250 full function driver

Data Structures | Typedefs | Enumerations | Functions
mpu9250 basic driver function
mpu9250 driver function

mpu9250 basic driver modules More...

## Data Structures
struct | mpu9250_handle_s
| mpu9250 handle structure definition More...
struct | mpu9250_info_s
| mpu9250 information structure definition More...

## Typedefs
typedef struct mpu9250_handle_s | mpu9250_handle_t
| mpu9250 handle structure definition More...
typedef struct mpu9250_info_s | mpu9250_info_t
| mpu9250 information structure definition More...

## Enumerations
enum | mpu9250_interface_t { MPU9250_INTERFACE_IIC = 0x00 , MPU9250_INTERFACE_SPI = 0x01 }
| mpu9250 interface enumeration definition More...
enum | mpu9250_address_t { MPU9250_ADDRESS_AD0_LOW = 0xD0 , MPU9250_ADDRESS_AD0_HIGH = 0xD2 }
| mpu9250 address enumeration definition More...
enum | mpu9250_bool_t { MPU9250_BOOL_FALSE = 0x00 , MPU9250_BOOL_TRUE = 0x01 }
| mpu9250 bool enumeration definition More...
enum | mpu9250_source_t { MPU9250_SOURCE_ACC_X = 0x05 , MPU9250_SOURCE_ACC_Y = 0x04 , MPU9250_SOURCE_ACC_Z = 0x03 , MPU9250_SOURCE_GYRO_X = 0x02 , MPU9250_SOURCE_GYRO_Y = 0x01 , MPU9250_SOURCE_GYRO_Z = 0x00 }
| mpu9250 source enumeration definition More...
enum | mpu9250_clock_source_t { MPU9250_CLOCK_SOURCE_INTERNAL_20MHZ = 0x00 , MPU9250_CLOCK_SOURCE_PLL = 0x01 , MPU9250_CLOCK_SOURCE_STOP_CLOCK = 0x07 }
| mpu9250 clock source enumeration definition More...
enum | mpu9250_signal_path_reset_t { MPU9250_SIGNAL_PATH_RESET_TEMP = 0x00 , MPU9250_SIGNAL_PATH_RESET_ACCEL = 0x01 , MPU9250_SIGNAL_PATH_RESET_GYRO = 0x02 }
| mpu9250 signal path reset enumeration definition More...
enum | mpu9250_extern_sync_t { MPU9250_EXTERN_SYNC_INPUT_DISABLED = 0x00 , MPU9250_EXTERN_SYNC_TEMP_OUT_L = 0x01 , MPU9250_EXTERN_SYNC_GYRO_XOUT_L = 0x02 , MPU9250_EXTERN_SYNC_GYRO_YOUT_L = 0x03 , MPU9250_EXTERN_SYNC_GYRO_ZOUT_L = 0x04 , MPU9250_EXTERN_SYNC_ACCEL_XOUT_L = 0x05 , MPU9250_EXTERN_SYNC_ACCEL_YOUT_L = 0x06 , MPU9250_EXTERN_SYNC_ACCEL_ZOUT_L = 0x07 }
| mpu9250 extern sync enumeration definition More...
enum | mpu9250_low_pass_filter_t { MPU9250_LOW_PASS_FILTER_0 = 0x00 , MPU9250_LOW_PASS_FILTER_1 = 0x01 , MPU9250_LOW_PASS_FILTER_2 = 0x02 , MPU9250_LOW_PASS_FILTER_3 = 0x03 , MPU9250_LOW_PASS_FILTER_4 = 0x04 , MPU9250_LOW_PASS_FILTER_5 = 0x05 , MPU9250_LOW_PASS_FILTER_6 = 0x06 , MPU9250_LOW_PASS_FILTER_7 = 0x07 }
| mpu9250 low pass filter enumeration definition More...
enum | mpu9250_accelerometer_low_pass_filter_t { MPU9250_ACCELEROMETER_LOW_PASS_FILTER_0 = 0x00 , MPU9250_ACCELEROMETER_LOW_PASS_FILTER_1 = 0x01 , MPU9250_ACCELEROMETER_LOW_PASS_FILTER_2 = 0x02 , MPU9250_ACCELEROMETER_LOW_PASS_FILTER_3 = 0x03 , MPU9250_ACCELEROMETER_LOW_PASS_FILTER_4 = 0x04 , MPU9250_ACCELEROMETER_LOW_PASS_FILTER_5 = 0x05 , MPU9250_ACCELEROMETER_LOW_PASS_FILTER_6 = 0x06 , MPU9250_ACCELEROMETER_LOW_PASS_FILTER_7 = 0x07 }
| mpu9250 accelerometer low pass filter enumeration definition More...
enum | mpu9250_low_power_accel_output_rate_t { MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_0P24 = 0x00 , MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_0P49 = 0x01 , MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_0P98 = 0x02 , MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_1P95 = 0x03 , MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_3P91 = 0x04 , MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_7P81 = 0x05 , MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_15P63 = 0x06 , MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_31P25 = 0x07 , MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_62P50 = 0x08 , MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_125 = 0x09 , MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_250 = 0x0A , MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_500 = 0x0B }
| mpu9250 low power accel output rate enumeration definition More...
enum | mpu9250_axis_t { MPU9250_AXIS_Z = 0x05 , MPU9250_AXIS_Y = 0x06 , MPU9250_AXIS_X = 0x07 }
| mpu9250 axis enumeration definition More...
enum | mpu9250_gyroscope_range_t { MPU9250_GYROSCOPE_RANGE_250DPS = 0x00 , MPU9250_GYROSCOPE_RANGE_500DPS = 0x01 , MPU9250_GYROSCOPE_RANGE_1000DPS = 0x02 , MPU9250_GYROSCOPE_RANGE_2000DPS = 0x03 }
| mpu9250 gyroscope range enumeration definition More...
enum | mpu9250_accelerometer_range_t { MPU9250_ACCELEROMETER_RANGE_2G = 0x00 , MPU9250_ACCELEROMETER_RANGE_4G = 0x01 , MPU9250_ACCELEROMETER_RANGE_8G = 0x02 , MPU9250_ACCELEROMETER_RANGE_16G = 0x03 }
| mpu9250 accelerometer range enumeration definition More...
enum | mpu9250_fifo_t { MPU9250_FIFO_TEMP = 0x07 , MPU9250_FIFO_XG = 0x06 , MPU9250_FIFO_YG = 0x05 , MPU9250_FIFO_ZG = 0x04 , MPU9250_FIFO_ACCEL = 0x03 }
| mpu9250 fifo enumeration definition More...
enum | mpu9250_fifo_mode { MPU9250_FIFO_MODE_STREAM = 0x00 , MPU9250_FIFO_MODE_NORMAL = 0x01 }
| mpu9250 fifo mode enumeration definition More...
enum | mpu9250_pin_level_t { MPU9250_PIN_LEVEL_HIGH = 0x00 , MPU9250_PIN_LEVEL_LOW = 0x01 }
| mpu9250 pin level enumeration definition More...
enum | mpu9250_pin_type_t { MPU9250_PIN_TYPE_PUSH_PULL = 0x00 , MPU9250_PIN_TYPE_OPEN_DRAIN = 0x01 }
| mpu9250 pin type enumeration definition More...
enum | mpu9250_interrupt_t { MPU9250_INTERRUPT_MOTION = 6 , MPU9250_INTERRUPT_FIFO_OVERFLOW = 4 , MPU9250_INTERRUPT_FSYNC_INT = 3 , MPU9250_INTERRUPT_DMP = 1 , MPU9250_INTERRUPT_DATA_READY = 0 }
| mpu9250 interrupt enumeration definition More...
enum | mpu9250_iic_slave_t { MPU9250_IIC_SLAVE_0 = 0x00 , MPU9250_IIC_SLAVE_1 = 0x01 , MPU9250_IIC_SLAVE_2 = 0x02 , MPU9250_IIC_SLAVE_3 = 0x03 , MPU9250_IIC_SLAVE_4 = 0x04 }
| mpu9250 iic slave enumeration definition More...
enum | mpu9250_iic_clock_t { MPU9250_IIC_CLOCK_348_KHZ = 0x00 , MPU9250_IIC_CLOCK_333_KHZ = 0x01 , MPU9250_IIC_CLOCK_320_KHZ = 0x02 , MPU9250_IIC_CLOCK_308_KHZ = 0x03 , MPU9250_IIC_CLOCK_296_KHZ = 0x04 , MPU9250_IIC_CLOCK_286_KHZ = 0x05 , MPU9250_IIC_CLOCK_276_KHZ = 0x06 , MPU9250_IIC_CLOCK_267_KHZ = 0x07 , MPU9250_IIC_CLOCK_258_KHZ = 0x08 , MPU9250_IIC_CLOCK_500_KHZ = 0x09 , MPU9250_IIC_CLOCK_471_KHZ = 0x0A , MPU9250_IIC_CLOCK_444_KHZ = 0x0B , MPU9250_IIC_CLOCK_421_KHZ = 0x0C , MPU9250_IIC_CLOCK_400_KHZ = 0x0D , MPU9250_IIC_CLOCK_381_KHZ = 0x0E , MPU9250_IIC_CLOCK_364_KHZ = 0x0F }
| mpu9250 iic clock enumeration definition More...
enum | mpu9250_iic_read_mode_t { MPU9250_IIC_READ_MODE_RESTART = 0x00 , MPU9250_IIC_READ_MODE_STOP_AND_START = 0x01 }
| mpu9250 iic read mode enumeration definition More...
enum | mpu9250_iic_mode_t { MPU9250_IIC_MODE_WRITE = 0x00 , MPU9250_IIC_MODE_READ = 0x01 }
| mpu9250 iic mode enumeration definition More...
enum | mpu9250_iic_transaction_mode_t { MPU9250_IIC_TRANSACTION_MODE_DATA = 0x00 , MPU9250_IIC_TRANSACTION_MODE_REG_DATA = 0x01 }
| mpu9250 iic transaction mode enumeration definition More...
enum | mpu9250_iic4_transaction_mode_t { MPU9250_IIC4_TRANSACTION_MODE_DATA = 0x00 , MPU9250_IIC4_TRANSACTION_MODE_REG = 0x01 }
| mpu9250 iic4 transaction mode enumeration definition More...
enum | mpu9250_iic_group_order_t { MPU9250_IIC_GROUP_ORDER_EVEN = 0x00 , MPU9250_IIC_GROUP_ORDER_ODD = 0x01 }
| mpu9250 iic group order enumeration definition More...
enum | mpu9250_iic_status_t { MPU9250_IIC_STATUS_PASS_THROUGH = 0x80 , MPU9250_IIC_STATUS_IIC_SLV4_DONE = 0x40 , MPU9250_IIC_STATUS_IIC_LOST_ARB = 0x20 , MPU9250_IIC_STATUS_IIC_SLV4_NACK = 0x10 , MPU9250_IIC_STATUS_IIC_SLV3_NACK = 0x08 , MPU9250_IIC_STATUS_IIC_SLV2_NACK = 0x04 , MPU9250_IIC_STATUS_IIC_SLV1_NACK = 0x02 , MPU9250_IIC_STATUS_IIC_SLV0_NACK = 0x01 }
| mpu9250 iic status enumeration definition More...
enum | mpu9250_iic_delay_t { MPU9250_IIC_DELAY_ES_SHADOW = 7 , MPU9250_IIC_DELAY_SLAVE_4 = 4 , MPU9250_IIC_DELAY_SLAVE_3 = 3 , MPU9250_IIC_DELAY_SLAVE_2 = 2 , MPU9250_IIC_DELAY_SLAVE_1 = 1 , MPU9250_IIC_DELAY_SLAVE_0 = 0 }
| mpu9250 iic delay enumeration definition More...

## Functions
uint8_t | mpu9250_info (mpu9250_info_t *info)
| get the chip's information More...
uint8_t | mpu9250_set_interface (mpu9250_handle_t *handle, mpu9250_interface_t interface)
| set the chip interface More...
uint8_t | mpu9250_get_interface (mpu9250_handle_t *handle, mpu9250_interface_t *interface)
| get the chip interface More...
uint8_t | mpu9250_set_addr_pin (mpu9250_handle_t *handle, mpu9250_address_t addr_pin)
| set the chip address pin More...
uint8_t | mpu9250_get_addr_pin (mpu9250_handle_t *handle, mpu9250_address_t *addr_pin)
| get the chip address pin More...
uint8_t | mpu9250_irq_handler (mpu9250_handle_t *handle)
| irq handler More...
uint8_t | mpu9250_init (mpu9250_handle_t *handle)
| initialize the chip More...
uint8_t | mpu9250_deinit (mpu9250_handle_t *handle)
| close the chip More...
uint8_t | mpu9250_read (mpu9250_handle_t *handle, int16_t(*accel_raw)[3], float(*accel_g)[3], int16_t(*gyro_raw)[3], float(*gyro_dps)[3], int16_t(*mag_raw)[3], float(*mag_ut)[3], uint16_t *len)
| read the data More...
uint8_t | mpu9250_read_temperature (mpu9250_handle_t *handle, int16_t(*raw), float *degrees)
| read the temperature More...
uint8_t | mpu9250_set_fifo (mpu9250_handle_t *handle, mpu9250_bool_t enable)
| enable or disable fifo More...
uint8_t | mpu9250_get_fifo (mpu9250_handle_t *handle, mpu9250_bool_t *enable)
| get the fifo status More...
uint8_t | mpu9250_force_fifo_reset (mpu9250_handle_t *handle)
| force reset the fifo More...
uint8_t | mpu9250_set_iic_master (mpu9250_handle_t *handle, mpu9250_bool_t enable)
| enable or disable the iic master mode More...
uint8_t | mpu9250_get_iic_master (mpu9250_handle_t *handle, mpu9250_bool_t *enable)
| get the iic master status More...
uint8_t | mpu9250_set_disable_iic_slave (mpu9250_handle_t *handle, mpu9250_bool_t enable)
| enable or disable the iic slave mode More...
uint8_t | mpu9250_get_disable_iic_slave (mpu9250_handle_t *handle, mpu9250_bool_t *enable)
| get the iic slave status More...
uint8_t | mpu9250_fifo_reset (mpu9250_handle_t *handle)
| reset the fifo More...
uint8_t | mpu9250_get_fifo_reset (mpu9250_handle_t *handle, mpu9250_bool_t *enable)
| get the fifo reset status More...
uint8_t | mpu9250_iic_master_reset (mpu9250_handle_t *handle)
| reset the iic master controller More...
uint8_t | mpu9250_get_iic_master_reset (mpu9250_handle_t *handle, mpu9250_bool_t *enable)
| get the iic master reset status More...
uint8_t | mpu9250_sensor_reset (mpu9250_handle_t *handle)
| reset all sensors More...
uint8_t | mpu9250_get_sensor_reset (mpu9250_handle_t *handle, mpu9250_bool_t *enable)
| get the sensor reset status More...
uint8_t | mpu9250_device_reset (mpu9250_handle_t *handle)
| reset the chip More...
uint8_t | mpu9250_get_device_reset (mpu9250_handle_t *handle, mpu9250_bool_t *enable)
| get the device reset status More...
uint8_t | mpu9250_set_clock_source (mpu9250_handle_t *handle, mpu9250_clock_source_t clock_source)
| set the chip clock source More...
uint8_t | mpu9250_get_clock_source (mpu9250_handle_t *handle, mpu9250_clock_source_t *clock_source)
| get the chip clock source More...
uint8_t | mpu9250_set_ptat (mpu9250_handle_t *handle, mpu9250_bool_t enable)
| enable or disable the temperature sensor More...
uint8_t | mpu9250_get_ptat (mpu9250_handle_t *handle, mpu9250_bool_t *enable)
| get the temperature sensor status More...
uint8_t | mpu9250_set_cycle_wake_up (mpu9250_handle_t *handle, mpu9250_bool_t enable)
| enable or disable the cycle wake up mode More...
uint8_t | mpu9250_get_cycle_wake_up (mpu9250_handle_t *handle, mpu9250_bool_t *enable)
| get the cycle wake up mode status More...
uint8_t | mpu9250_set_sleep (mpu9250_handle_t *handle, mpu9250_bool_t enable)
| enable or disable the sleep mode More...
uint8_t | mpu9250_get_sleep (mpu9250_handle_t *handle, mpu9250_bool_t *enable)
| get the sleep status More...
uint8_t | mpu9250_set_gyro_standby (mpu9250_handle_t *handle, mpu9250_bool_t enable)
| enable or disable the gyro standby More...
uint8_t | mpu9250_get_gyro_standby (mpu9250_handle_t *handle, mpu9250_bool_t *enable)
| get the gyro standby status More...
uint8_t | mpu9250_set_standby_mode (mpu9250_handle_t *handle, mpu9250_source_t source, mpu9250_bool_t enable)
| set source into standby mode More...
uint8_t | mpu9250_get_standby_mode (mpu9250_handle_t *handle, mpu9250_source_t source, mpu9250_bool_t *enable)
| get the source mode More...
uint8_t | mpu9250_get_fifo_count (mpu9250_handle_t *handle, uint16_t *count)
| get the fifo counter value More...
uint8_t | mpu9250_fifo_get (mpu9250_handle_t *handle, uint8_t *buf, uint16_t len)
| fifo read bytes More...
uint8_t | mpu9250_fifo_set (mpu9250_handle_t *handle, uint8_t *buf, uint16_t len)
| fifo write bytes More...
uint8_t | mpu9250_set_signal_path_reset (mpu9250_handle_t *handle, mpu9250_signal_path_reset_t path)
| set the signal path reset More...
uint8_t | mpu9250_set_sample_rate_divider (mpu9250_handle_t *handle, uint8_t d)
| set the sample rate divider More...
uint8_t | mpu9250_get_sample_rate_divider (mpu9250_handle_t *handle, uint8_t *d)
| get the sample rate divider More...
uint8_t | mpu9250_set_extern_sync (mpu9250_handle_t *handle, mpu9250_extern_sync_t sync)
| set the extern sync type More...
uint8_t | mpu9250_get_extern_sync (mpu9250_handle_t *handle, mpu9250_extern_sync_t *sync)
| get the extern sync type More...
uint8_t | mpu9250_set_low_pass_filter (mpu9250_handle_t *handle, mpu9250_low_pass_filter_t filter)
| set the low pass filter More...
uint8_t | mpu9250_get_low_pass_filter (mpu9250_handle_t *handle, mpu9250_low_pass_filter_t *filter)
| get the low pass filter More...
uint8_t | mpu9250_set_fifo_mode (mpu9250_handle_t *handle, mpu9250_fifo_mode mode)
| set the fifo mode More...
uint8_t | mpu9250_get_fifo_mode (mpu9250_handle_t *handle, mpu9250_fifo_mode *mode)
| get the fifo mode More...
uint8_t | mpu9250_set_gyroscope_test (mpu9250_handle_t *handle, mpu9250_axis_t axis, mpu9250_bool_t enable)
| set the gyroscope test More...
uint8_t | mpu9250_get_gyroscope_test (mpu9250_handle_t *handle, mpu9250_axis_t axis, mpu9250_bool_t *enable)
| get the gyroscope test More...
uint8_t | mpu9250_set_gyroscope_range (mpu9250_handle_t *handle, mpu9250_gyroscope_range_t range)
| set the gyroscope range More...
uint8_t | mpu9250_get_gyroscope_range (mpu9250_handle_t *handle, mpu9250_gyroscope_range_t *range)
| get the gyroscope range More...
uint8_t | mpu9250_set_gyroscope_choice (mpu9250_handle_t *handle, uint8_t choice)
| set the gyroscope choice More...
uint8_t | mpu9250_get_gyroscope_choice (mpu9250_handle_t *handle, uint8_t *choice)
| get the gyroscope choice More...
uint8_t | mpu9250_set_accelerometer_test (mpu9250_handle_t *handle, mpu9250_axis_t axis, mpu9250_bool_t enable)
| set the accelerometer test More...
uint8_t | mpu9250_get_accelerometer_test (mpu9250_handle_t *handle, mpu9250_axis_t axis, mpu9250_bool_t *enable)
| get the accelerometer test More...
uint8_t | mpu9250_set_accelerometer_range (mpu9250_handle_t *handle, mpu9250_accelerometer_range_t range)
| set the accelerometer range More...
uint8_t | mpu9250_get_accelerometer_range (mpu9250_handle_t *handle, mpu9250_accelerometer_range_t *range)
| get the accelerometer range More...
uint8_t | mpu9250_set_fifo_1024kb (mpu9250_handle_t *handle)
| set fifo 1024kb More...
uint8_t | mpu9250_set_accelerometer_choice (mpu9250_handle_t *handle, uint8_t choice)
| set the accelerometer choice More...
uint8_t | mpu9250_get_accelerometer_choice (mpu9250_handle_t *handle, uint8_t *choice)
| get the accelerometer choice More...
uint8_t | mpu9250_set_accelerometer_low_pass_filter (mpu9250_handle_t *handle, mpu9250_accelerometer_low_pass_filter_t filter)
| set the accelerometer low pass filter More...
uint8_t | mpu9250_get_accelerometer_low_pass_filter (mpu9250_handle_t *handle, mpu9250_accelerometer_low_pass_filter_t *filter)
| get the accelerometer low pass filter More...
uint8_t | mpu9250_set_low_power_accel_output_rate (mpu9250_handle_t *handle, mpu9250_low_power_accel_output_rate_t rate)
| set the low power accel output rate More...
uint8_t | mpu9250_get_low_power_accel_output_rate (mpu9250_handle_t *handle, mpu9250_low_power_accel_output_rate_t *rate)
| get the low power accel output rate More...
uint8_t | mpu9250_set_wake_on_motion (mpu9250_handle_t *handle, mpu9250_bool_t enable)
| enable or disable wake on motion More...
uint8_t | mpu9250_get_wake_on_motion (mpu9250_handle_t *handle, mpu9250_bool_t *enable)
| get the wake on motion status More...
uint8_t | mpu9250_set_accel_compare_with_previous_sample (mpu9250_handle_t *handle, mpu9250_bool_t enable)
| enable or disable accel compare with previous sample More...
uint8_t | mpu9250_get_accel_compare_with_previous_sample (mpu9250_handle_t *handle, mpu9250_bool_t *enable)
| get the accel compare with previous sample status More...
uint8_t | mpu9250_set_accelerometer_x_offset (mpu9250_handle_t *handle, int16_t offset)
| set the accelerometer x offset More...
uint8_t | mpu9250_get_accelerometer_x_offset (mpu9250_handle_t *handle, int16_t *offset)
| get the accelerometer x offset More...
uint8_t | mpu9250_set_accelerometer_y_offset (mpu9250_handle_t *handle, int16_t offset)
| set the accelerometer y offset More...
uint8_t | mpu9250_get_accelerometer_y_offset (mpu9250_handle_t *handle, int16_t *offset)
| get the accelerometer y offset More...
uint8_t | mpu9250_set_accelerometer_z_offset (mpu9250_handle_t *handle, int16_t offset)
| set the accelerometer z offset More...
uint8_t | mpu9250_get_accelerometer_z_offset (mpu9250_handle_t *handle, int16_t *offset)
| get the accelerometer z offset More...
uint8_t | mpu9250_accelerometer_offset_convert_to_register (mpu9250_handle_t *handle, float mg, int16_t *reg)
| convert the accelerometer offset to the register raw data More...
uint8_t | mpu9250_accelerometer_offset_convert_to_data (mpu9250_handle_t *handle, int16_t reg, float *mg)
| convert the register raw data to the accelerometer offset More...
uint8_t | mpu9250_set_gyro_x_offset (mpu9250_handle_t *handle, int16_t offset)
| set the gyro x offset More...
uint8_t | mpu9250_get_gyro_x_offset (mpu9250_handle_t *handle, int16_t *offset)
| get the gyro x offset More...
uint8_t | mpu9250_set_gyro_y_offset (mpu9250_handle_t *handle, int16_t offset)
| set the gyro y offset More...
uint8_t | mpu9250_get_gyro_y_offset (mpu9250_handle_t *handle, int16_t *offset)
| get the gyro y offset More...
uint8_t | mpu9250_set_gyro_z_offset (mpu9250_handle_t *handle, int16_t offset)
| set the gyro z offset More...
uint8_t | mpu9250_get_gyro_z_offset (mpu9250_handle_t *handle, int16_t *offset)
| get the gyro z offset More...
uint8_t | mpu9250_gyro_offset_convert_to_register (mpu9250_handle_t *handle, float dps, int16_t *reg)
| convert the gyro offset to the register raw data More...
uint8_t | mpu9250_gyro_offset_convert_to_data (mpu9250_handle_t *handle, int16_t reg, float *dps)
| convert the register raw data to the gyro offset More...
uint8_t | mpu9250_set_fifo_enable (mpu9250_handle_t *handle, mpu9250_fifo_t fifo, mpu9250_bool_t enable)
| enable or disable the fifo function More...
uint8_t | mpu9250_get_fifo_enable (mpu9250_handle_t *handle, mpu9250_fifo_t fifo, mpu9250_bool_t *enable)
| get the fifo function status More...
uint8_t | mpu9250_set_interrupt_level (mpu9250_handle_t *handle, mpu9250_pin_level_t level)
| set the interrupt level More...
uint8_t | mpu9250_get_interrupt_level (mpu9250_handle_t *handle, mpu9250_pin_level_t *level)
| get the interrupt level More...
uint8_t | mpu9250_set_interrupt_pin_type (mpu9250_handle_t *handle, mpu9250_pin_type_t type)
| set the interrupt pin type More...
uint8_t | mpu9250_get_interrupt_pin_type (mpu9250_handle_t *handle, mpu9250_pin_type_t *type)
| get the interrupt pin type More...
uint8_t | mpu9250_set_interrupt_latch (mpu9250_handle_t *handle, mpu9250_bool_t enable)
| enable or disable the interrupt latch More...
uint8_t | mpu9250_get_interrupt_latch (mpu9250_handle_t *handle, mpu9250_bool_t *enable)
| get the interrupt latch status More...
uint8_t | mpu9250_set_interrupt_read_clear (mpu9250_handle_t *handle, mpu9250_bool_t enable)
| enable or disable the interrupt reading clear More...
uint8_t | mpu9250_get_interrupt_read_clear (mpu9250_handle_t *handle, mpu9250_bool_t *enable)
| get the interrupt reading clear status More...
uint8_t | mpu9250_set_fsync_interrupt_level (mpu9250_handle_t *handle, mpu9250_pin_level_t level)
| set the fsync interrupt level More...
uint8_t | mpu9250_get_fsync_interrupt_level (mpu9250_handle_t *handle, mpu9250_pin_level_t *level)
| get the fsync interrupt level More...
uint8_t | mpu9250_set_fsync_interrupt (mpu9250_handle_t *handle, mpu9250_bool_t enable)
| enable or disable the fsync interrupt More...
uint8_t | mpu9250_get_fsync_interrupt (mpu9250_handle_t *handle, mpu9250_bool_t *enable)
| get the fsync interrupt status More...
uint8_t | mpu9250_set_iic_bypass (mpu9250_handle_t *handle, mpu9250_bool_t enable)
| enable or disable the iic bypass More...
uint8_t | mpu9250_get_iic_bypass (mpu9250_handle_t *handle, mpu9250_bool_t *enable)
| get the iic bypass status More...
uint8_t | mpu9250_set_interrupt (mpu9250_handle_t *handle, mpu9250_interrupt_t type, mpu9250_bool_t enable)
| enable or disable the interrupt More...
uint8_t | mpu9250_get_interrupt (mpu9250_handle_t *handle, mpu9250_interrupt_t type, mpu9250_bool_t *enable)
| get the interrupt status More...
uint8_t | mpu9250_get_interrupt_status (mpu9250_handle_t *handle, uint8_t *status)
| get the interrupt status More...
uint8_t | mpu9250_set_gyroscope_x_test (mpu9250_handle_t *handle, uint8_t data)
| set the gyroscope x test More...
uint8_t | mpu9250_get_gyroscope_x_test (mpu9250_handle_t *handle, uint8_t *data)
| get the gyroscope x test More...
uint8_t | mpu9250_set_gyroscope_y_test (mpu9250_handle_t *handle, uint8_t data)
| set the gyroscope y test More...
uint8_t | mpu9250_get_gyroscope_y_test (mpu9250_handle_t *handle, uint8_t *data)
| get the gyroscope y test More...
uint8_t | mpu9250_set_gyroscope_z_test (mpu9250_handle_t *handle, uint8_t data)
| set the gyroscope z test More...
uint8_t | mpu9250_get_gyroscope_z_test (mpu9250_handle_t *handle, uint8_t *data)
| get the gyroscope z test More...
uint8_t | mpu9250_set_accelerometer_x_test (mpu9250_handle_t *handle, uint8_t data)
| set the accelerometer x test More...
uint8_t | mpu9250_get_accelerometer_x_test (mpu9250_handle_t *handle, uint8_t *data)
| get the accelerometer x test More...
uint8_t | mpu9250_set_accelerometer_y_test (mpu9250_handle_t *handle, uint8_t data)
| set the accelerometer y test More...
uint8_t | mpu9250_get_accelerometer_y_test (mpu9250_handle_t *handle, uint8_t *data)
| get the accelerometer y test More...
uint8_t | mpu9250_set_accelerometer_z_test (mpu9250_handle_t *handle, uint8_t data)
| set the accelerometer z test More...
uint8_t | mpu9250_get_accelerometer_z_test (mpu9250_handle_t *handle, uint8_t *data)
| get the accelerometer z test More...
uint8_t | mpu9250_set_motion_threshold (mpu9250_handle_t *handle, uint8_t threshold)
| set the motion_threshold More...
uint8_t | mpu9250_get_motion_threshold (mpu9250_handle_t *handle, uint8_t *threshold)
| get the motion_threshold More...
uint8_t | mpu9250_motion_threshold_convert_to_register (mpu9250_handle_t *handle, float mg, uint8_t *reg)
| convert the motion threshold to the register raw data More...
uint8_t | mpu9250_motion_threshold_convert_to_data (mpu9250_handle_t *handle, uint8_t reg, float *mg)
| convert the register raw data to the motion threshold More...
uint8_t | mpu9250_self_test (mpu9250_handle_t *handle, int32_t gyro_offset_raw[3], int32_t accel_offset_raw[3])
| run the self test More...
uint8_t | mpu9250_set_iic_clock (mpu9250_handle_t *handle, mpu9250_iic_clock_t clk)
| set the iic clock More...
uint8_t | mpu9250_get_iic_clock (mpu9250_handle_t *handle, mpu9250_iic_clock_t *clk)
| get the iic clock More...
uint8_t | mpu9250_set_iic_multi_master (mpu9250_handle_t *handle, mpu9250_bool_t enable)
| enable or disable iic multi master More...
uint8_t | mpu9250_get_iic_multi_master (mpu9250_handle_t *handle, mpu9250_bool_t *enable)
| get the iic multi master status More...
uint8_t | mpu9250_set_iic_wait_for_external_sensor (mpu9250_handle_t *handle, mpu9250_bool_t enable)
| enable or disable iic wait for external sensor More...
uint8_t | mpu9250_get_iic_wait_for_external_sensor (mpu9250_handle_t *handle, mpu9250_bool_t *enable)
| get the iic wait for external sensor status More...
uint8_t | mpu9250_set_iic_read_mode (mpu9250_handle_t *handle, mpu9250_iic_read_mode_t mode)
| set the iic read mode More...
uint8_t | mpu9250_get_iic_read_mode (mpu9250_handle_t *handle, mpu9250_iic_read_mode_t *mode)
| get the iic read mode More...
uint8_t | mpu9250_set_iic_fifo_enable (mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, mpu9250_bool_t enable)
| enable or disable the iic fifo More...
uint8_t | mpu9250_get_iic_fifo_enable (mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, mpu9250_bool_t *enable)
| get the iic fifo status More...
uint8_t | mpu9250_set_iic_mode (mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, mpu9250_iic_mode_t mode)
| set the iic mode More...
uint8_t | mpu9250_get_iic_mode (mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, mpu9250_iic_mode_t *mode)
| get the iic mode More...
uint8_t | mpu9250_set_iic_address (mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, uint8_t addr_7bit)
| set the iic address More...
uint8_t | mpu9250_get_iic_address (mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, uint8_t *addr_7bit)
| get the iic address More...
uint8_t | mpu9250_set_iic_register (mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, uint8_t reg)
| set the iic register More...
uint8_t | mpu9250_get_iic_register (mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, uint8_t *reg)
| get the iic register More...
uint8_t | mpu9250_set_iic_data_out (mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, uint8_t data)
| set the iic data out More...
uint8_t | mpu9250_get_iic_data_out (mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, uint8_t *data)
| get the iic data out More...
uint8_t | mpu9250_set_iic_enable (mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, mpu9250_bool_t enable)
| enable or disable the iic More...
uint8_t | mpu9250_get_iic_enable (mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, mpu9250_bool_t *enable)
| get the iic status More...
uint8_t | mpu9250_set_iic_byte_swap (mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, mpu9250_bool_t enable)
| enable or disable the iic byte swap More...
uint8_t | mpu9250_get_iic_byte_swap (mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, mpu9250_bool_t *enable)
| get the iic byte swap status More...
uint8_t | mpu9250_set_iic_transaction_mode (mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, mpu9250_iic_transaction_mode_t mode)
| set the iic transaction mode More...
uint8_t | mpu9250_get_iic_transaction_mode (mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, mpu9250_iic_transaction_mode_t *mode)
| get the iic transaction mode More...
uint8_t | mpu9250_set_iic_group_order (mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, mpu9250_iic_group_order_t order)
| set the iic group order More...
uint8_t | mpu9250_get_iic_group_order (mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, mpu9250_iic_group_order_t *order)
| get the iic group order More...
uint8_t | mpu9250_set_iic_transferred_len (mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, uint8_t len)
| set the iic transferred length More...
uint8_t | mpu9250_get_iic_transferred_len (mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, uint8_t *len)
| get the iic transferred length More...
uint8_t | mpu9250_get_iic_status (mpu9250_handle_t *handle, uint8_t *status)
| get the iic status More...
uint8_t | mpu9250_set_iic_delay_enable (mpu9250_handle_t *handle, mpu9250_iic_delay_t delay, mpu9250_bool_t enable)
| enable or disable the iic delay More...
uint8_t | mpu9250_get_iic_delay_enable (mpu9250_handle_t *handle, mpu9250_iic_delay_t delay, mpu9250_bool_t *enable)
| get the iic delay status More...
uint8_t | mpu9250_set_iic4_enable (mpu9250_handle_t *handle, mpu9250_bool_t enable)
| enable or disable the iic4 More...
uint8_t | mpu9250_get_iic4_enable (mpu9250_handle_t *handle, mpu9250_bool_t *enable)
| get the iic4 status More...
uint8_t | mpu9250_set_iic4_interrupt (mpu9250_handle_t *handle, mpu9250_bool_t enable)
| enable or disable the iic4 interrupt More...
uint8_t | mpu9250_get_iic4_interrupt (mpu9250_handle_t *handle, mpu9250_bool_t *enable)
| get the iic4 interrupt status More...
uint8_t | mpu9250_set_iic4_transaction_mode (mpu9250_handle_t *handle, mpu9250_iic4_transaction_mode_t mode)
| set the iic4 transaction mode More...
uint8_t | mpu9250_get_iic4_transaction_mode (mpu9250_handle_t *handle, mpu9250_iic4_transaction_mode_t *mode)
| get the iic4 transaction mode More...
uint8_t | mpu9250_set_iic_delay (mpu9250_handle_t *handle, uint8_t delay)
| set the iic delay More...
uint8_t | mpu9250_get_iic_delay (mpu9250_handle_t *handle, uint8_t *delay)
| get the iic delay More...
uint8_t | mpu9250_set_iic4_data_out (mpu9250_handle_t *handle, uint8_t data)
| set the iic4 data out More...
uint8_t | mpu9250_get_iic4_data_out (mpu9250_handle_t *handle, uint8_t *data)
| get the iic4 data out More...
uint8_t | mpu9250_set_iic4_data_in (mpu9250_handle_t *handle, uint8_t data)
| set the iic4 data in More...
uint8_t | mpu9250_get_iic4_data_in (mpu9250_handle_t *handle, uint8_t *data)
| get the iic4 data in More...
uint8_t | mpu9250_read_extern_sensor_data (mpu9250_handle_t *handle, uint8_t *data, uint8_t len)
| read the extern sensor data More...

## Detailed Description

mpu9250 basic driver modules

## Typedef Documentation

## ◆ mpu9250_handle_t

typedef struct mpu9250_handle_s mpu9250_handle_t

mpu9250 handle structure definition

## ◆ mpu9250_info_t

typedef struct mpu9250_info_s mpu9250_info_t

mpu9250 information structure definition

## Enumeration Type Documentation

## ◆ mpu9250_accelerometer_low_pass_filter_t

enum mpu9250_accelerometer_low_pass_filter_t

mpu9250 accelerometer low pass filter enumeration definition

Enumerator
MPU9250_ACCELEROMETER_LOW_PASS_FILTER_0 | 3db BW(Hz) rate(KHz) delay(ms) 1 1046 4 0.503 0 218.1 1 1.88
MPU9250_ACCELEROMETER_LOW_PASS_FILTER_1 | 0 218.1 1 1.88
MPU9250_ACCELEROMETER_LOW_PASS_FILTER_2 | 0 99 1 2.88
MPU9250_ACCELEROMETER_LOW_PASS_FILTER_3 | 0 44.8 1 4.88
MPU9250_ACCELEROMETER_LOW_PASS_FILTER_4 | 0 21.2 1 8.87
MPU9250_ACCELEROMETER_LOW_PASS_FILTER_5 | 0 10.2 1 16.83
MPU9250_ACCELEROMETER_LOW_PASS_FILTER_6 | 0 5.05 1 32.48
MPU9250_ACCELEROMETER_LOW_PASS_FILTER_7 | 0 420 1 1.38

Definition at line 154 of file driver_mpu9250.h.

## ◆ mpu9250_accelerometer_range_t

enum mpu9250_accelerometer_range_t

mpu9250 accelerometer range enumeration definition

Enumerator
MPU9250_ACCELEROMETER_RANGE_2G | ±2 g
MPU9250_ACCELEROMETER_RANGE_4G | ±4 g
MPU9250_ACCELEROMETER_RANGE_8G | ±8 g
MPU9250_ACCELEROMETER_RANGE_16G | ±16 g

Definition at line 210 of file driver_mpu9250.h.

## ◆ mpu9250_address_t

enum mpu9250_address_t

mpu9250 address enumeration definition

Enumerator
MPU9250_ADDRESS_AD0_LOW | AD0 pin set LOW
MPU9250_ADDRESS_AD0_HIGH | AD0 pin set HIGH

Definition at line 71 of file driver_mpu9250.h.

## ◆ mpu9250_axis_t

enum mpu9250_axis_t

mpu9250 axis enumeration definition

Enumerator
MPU9250_AXIS_Z | z
MPU9250_AXIS_Y | y
MPU9250_AXIS_X | x

Definition at line 189 of file driver_mpu9250.h.

## ◆ mpu9250_bool_t

enum mpu9250_bool_t

mpu9250 bool enumeration definition

Enumerator
MPU9250_BOOL_FALSE | disable function
MPU9250_BOOL_TRUE | enable function

Definition at line 80 of file driver_mpu9250.h.

## ◆ mpu9250_clock_source_t

enum mpu9250_clock_source_t

mpu9250 clock source enumeration definition

Enumerator
MPU9250_CLOCK_SOURCE_INTERNAL_20MHZ | internal 20MHz
MPU9250_CLOCK_SOURCE_PLL | pll reference
MPU9250_CLOCK_SOURCE_STOP_CLOCK | stop the clock

Definition at line 102 of file driver_mpu9250.h.

## ◆ mpu9250_extern_sync_t

enum mpu9250_extern_sync_t

mpu9250 extern sync enumeration definition

Enumerator
MPU9250_EXTERN_SYNC_INPUT_DISABLED | input disabled
MPU9250_EXTERN_SYNC_TEMP_OUT_L | temp out low
MPU9250_EXTERN_SYNC_GYRO_XOUT_L | gyro xout low
MPU9250_EXTERN_SYNC_GYRO_YOUT_L | gyro yout low
MPU9250_EXTERN_SYNC_GYRO_ZOUT_L | gyro zout low
MPU9250_EXTERN_SYNC_ACCEL_XOUT_L | accel xout low
MPU9250_EXTERN_SYNC_ACCEL_YOUT_L | accel yout low
MPU9250_EXTERN_SYNC_ACCEL_ZOUT_L | accel zout low

Definition at line 122 of file driver_mpu9250.h.

## ◆ mpu9250_fifo_mode

enum mpu9250_fifo_mode

mpu9250 fifo mode enumeration definition

Enumerator
MPU9250_FIFO_MODE_STREAM | when the fifo is full, additional writes will be written to the fifo, replacing the oldest data
MPU9250_FIFO_MODE_NORMAL | when the fifo is full, additional writes will not be written to fifo

Definition at line 233 of file driver_mpu9250.h.

## ◆ mpu9250_fifo_t

enum mpu9250_fifo_t

mpu9250 fifo enumeration definition

Enumerator
MPU9250_FIFO_TEMP | temperature
MPU9250_FIFO_XG | gyroscope x
MPU9250_FIFO_YG | gyroscope y
MPU9250_FIFO_ZG | gyroscope z
MPU9250_FIFO_ACCEL | accelerometer

Definition at line 221 of file driver_mpu9250.h.

## ◆ mpu9250_gyroscope_range_t

enum mpu9250_gyroscope_range_t

mpu9250 gyroscope range enumeration definition

Enumerator
MPU9250_GYROSCOPE_RANGE_250DPS | ±250 dps
MPU9250_GYROSCOPE_RANGE_500DPS | ±500 dps
MPU9250_GYROSCOPE_RANGE_1000DPS | ±1000 dps
MPU9250_GYROSCOPE_RANGE_2000DPS | ±2000 dps

Definition at line 199 of file driver_mpu9250.h.

## ◆ mpu9250_iic4_transaction_mode_t

enum mpu9250_iic4_transaction_mode_t

mpu9250 iic4 transaction mode enumeration definition

Enumerator
MPU9250_IIC4_TRANSACTION_MODE_DATA | data only
MPU9250_IIC4_TRANSACTION_MODE_REG | register only

Definition at line 335 of file driver_mpu9250.h.

## ◆ mpu9250_iic_clock_t

enum mpu9250_iic_clock_t

mpu9250 iic clock enumeration definition

Enumerator
MPU9250_IIC_CLOCK_348_KHZ | 348 kHz
MPU9250_IIC_CLOCK_333_KHZ | 333 kHz
MPU9250_IIC_CLOCK_320_KHZ | 320 kHz
MPU9250_IIC_CLOCK_308_KHZ | 308 kHz
MPU9250_IIC_CLOCK_296_KHZ | 296 kHz
MPU9250_IIC_CLOCK_286_KHZ | 286 kHz
MPU9250_IIC_CLOCK_276_KHZ | 276 kHz
MPU9250_IIC_CLOCK_267_KHZ | 267 kHz
MPU9250_IIC_CLOCK_258_KHZ | 258 kHz
MPU9250_IIC_CLOCK_500_KHZ | 500 kHz
MPU9250_IIC_CLOCK_471_KHZ | 471 kHz
MPU9250_IIC_CLOCK_444_KHZ | 444 kHz
MPU9250_IIC_CLOCK_421_KHZ | 421 kHz
MPU9250_IIC_CLOCK_400_KHZ | 400 kHz
MPU9250_IIC_CLOCK_381_KHZ | 381 kHz
MPU9250_IIC_CLOCK_364_KHZ | 364 kHz

Definition at line 285 of file driver_mpu9250.h.

## ◆ mpu9250_iic_delay_t

enum mpu9250_iic_delay_t

mpu9250 iic delay enumeration definition

Enumerator
MPU9250_IIC_DELAY_ES_SHADOW | delays shadowing of external sensor data until all data has been received
MPU9250_IIC_DELAY_SLAVE_4 | slave 4
MPU9250_IIC_DELAY_SLAVE_3 | slave 3
MPU9250_IIC_DELAY_SLAVE_2 | slave 2
MPU9250_IIC_DELAY_SLAVE_1 | slave 1
MPU9250_IIC_DELAY_SLAVE_0 | slave 0

Definition at line 370 of file driver_mpu9250.h.

## ◆ mpu9250_iic_group_order_t

enum mpu9250_iic_group_order_t

mpu9250 iic group order enumeration definition

Enumerator
MPU9250_IIC_GROUP_ORDER_EVEN | when cleared to 0, bytes from register addresses 0 and 1, 2 and 3, etc (even, then odd register addresses) are paired to form a word
MPU9250_IIC_GROUP_ORDER_ODD | when set to 1, bytes from register addresses are paired 1 and 2, 3 and 4, etc (odd, then even register addresses) are paired to form a word

Definition at line 344 of file driver_mpu9250.h.

## ◆ mpu9250_iic_mode_t

enum mpu9250_iic_mode_t

mpu9250 iic mode enumeration definition

Enumerator
MPU9250_IIC_MODE_WRITE | write
MPU9250_IIC_MODE_READ | read

Definition at line 317 of file driver_mpu9250.h.

## ◆ mpu9250_iic_read_mode_t

enum mpu9250_iic_read_mode_t

mpu9250 iic read mode enumeration definition

Enumerator
MPU9250_IIC_READ_MODE_RESTART | restart
MPU9250_IIC_READ_MODE_STOP_AND_START | stop and start

Definition at line 308 of file driver_mpu9250.h.

## ◆ mpu9250_iic_slave_t

enum mpu9250_iic_slave_t

mpu9250 iic slave enumeration definition

Enumerator
MPU9250_IIC_SLAVE_0 | slave0
MPU9250_IIC_SLAVE_1 | slave1
MPU9250_IIC_SLAVE_2 | slave2
MPU9250_IIC_SLAVE_3 | slave3
MPU9250_IIC_SLAVE_4 | slave4

Definition at line 273 of file driver_mpu9250.h.

## ◆ mpu9250_iic_status_t

enum mpu9250_iic_status_t

mpu9250 iic status enumeration definition

Enumerator
MPU9250_IIC_STATUS_PASS_THROUGH | pass through
MPU9250_IIC_STATUS_IIC_SLV4_DONE | slave4 done
MPU9250_IIC_STATUS_IIC_LOST_ARB | lost arbitration
MPU9250_IIC_STATUS_IIC_SLV4_NACK | slave4 nack
MPU9250_IIC_STATUS_IIC_SLV3_NACK | slave3 nack
MPU9250_IIC_STATUS_IIC_SLV2_NACK | slave2 nack
MPU9250_IIC_STATUS_IIC_SLV1_NACK | slave1 nack
MPU9250_IIC_STATUS_IIC_SLV0_NACK | slave0 nack

Definition at line 355 of file driver_mpu9250.h.

## ◆ mpu9250_iic_transaction_mode_t

enum mpu9250_iic_transaction_mode_t

mpu9250 iic transaction mode enumeration definition

Enumerator
MPU9250_IIC_TRANSACTION_MODE_DATA | data only
MPU9250_IIC_TRANSACTION_MODE_REG_DATA | write a register address prior to reading or writing data

Definition at line 326 of file driver_mpu9250.h.

## ◆ mpu9250_interface_t

enum mpu9250_interface_t

mpu9250 interface enumeration definition

Enumerator
MPU9250_INTERFACE_IIC | iic interface function
MPU9250_INTERFACE_SPI | spi interface function

Definition at line 62 of file driver_mpu9250.h.

## ◆ mpu9250_interrupt_t

enum mpu9250_interrupt_t

mpu9250 interrupt enumeration definition

Enumerator
MPU9250_INTERRUPT_MOTION | motion
MPU9250_INTERRUPT_FIFO_OVERFLOW | fifo overflow
MPU9250_INTERRUPT_FSYNC_INT | fsync int
MPU9250_INTERRUPT_DMP | dmp
MPU9250_INTERRUPT_DATA_READY | data ready

Definition at line 261 of file driver_mpu9250.h.

## ◆ mpu9250_low_pass_filter_t

enum mpu9250_low_pass_filter_t

mpu9250 low pass filter enumeration definition

Enumerator
MPU9250_LOW_PASS_FILTER_0 | bandwidth(Hz) fs(KHz) delay(ms) bandwidth(Hz) delay(ms) 11/01 8800 32 0.064 4000 0.04 10 3600 32 0.11 4000 0.04 00 250 8 0.97 4000 0.04
MPU9250_LOW_PASS_FILTER_1 | 00 184 1 2.9 188 1.9
MPU9250_LOW_PASS_FILTER_2 | 00 92 1 3.9 98 2.8
MPU9250_LOW_PASS_FILTER_3 | 00 41 1 5.9 42 4.8
MPU9250_LOW_PASS_FILTER_4 | 00 20 1 9.9 20 8.3
MPU9250_LOW_PASS_FILTER_5 | 00 10 1 17.85 10 13.4
MPU9250_LOW_PASS_FILTER_6 | 00 5 1 33.48 5 18.6
MPU9250_LOW_PASS_FILTER_7 | 00 3600 8 0.17 4000 0.04

Definition at line 137 of file driver_mpu9250.h.

## ◆ mpu9250_low_power_accel_output_rate_t

enum mpu9250_low_power_accel_output_rate_t

mpu9250 low power accel output rate enumeration definition

Enumerator
MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_0P24 | 0.24Hz
MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_0P49 | 0.49Hz
MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_0P98 | 0.98Hz
MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_1P95 | 1.95Hz
MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_3P91 | 3.91Hz
MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_7P81 | 7.81Hz
MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_15P63 | 15.63Hz
MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_31P25 | 31.25Hz
MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_62P50 | 62.50Hz
MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_125 | 125Hz
MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_250 | 250Hz
MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_500 | 500Hz

Definition at line 170 of file driver_mpu9250.h.

## ◆ mpu9250_pin_level_t

enum mpu9250_pin_level_t

mpu9250 pin level enumeration definition

Enumerator
MPU9250_PIN_LEVEL_HIGH | active low
MPU9250_PIN_LEVEL_LOW | active high

Definition at line 243 of file driver_mpu9250.h.

## ◆ mpu9250_pin_type_t

enum mpu9250_pin_type_t

mpu9250 pin type enumeration definition

Enumerator
MPU9250_PIN_TYPE_PUSH_PULL | push pull
MPU9250_PIN_TYPE_OPEN_DRAIN | open drain

Definition at line 252 of file driver_mpu9250.h.

## ◆ mpu9250_signal_path_reset_t

enum mpu9250_signal_path_reset_t

mpu9250 signal path reset enumeration definition

Enumerator
MPU9250_SIGNAL_PATH_RESET_TEMP | temperature sensor analog and digital signal paths
MPU9250_SIGNAL_PATH_RESET_ACCEL | accelerometer analog and digital signal paths
MPU9250_SIGNAL_PATH_RESET_GYRO | gyroscope analog and digital signal paths

Definition at line 112 of file driver_mpu9250.h.

## ◆ mpu9250_source_t

enum mpu9250_source_t

mpu9250 source enumeration definition

Enumerator
MPU9250_SOURCE_ACC_X | accelerometer x
MPU9250_SOURCE_ACC_Y | accelerometer y
MPU9250_SOURCE_ACC_Z | accelerometer z
MPU9250_SOURCE_GYRO_X | gyroscope x
MPU9250_SOURCE_GYRO_Y | gyroscope y
MPU9250_SOURCE_GYRO_Z | gyroscope z

Definition at line 89 of file driver_mpu9250.h.

## Function Documentation

## ◆ mpu9250_accelerometer_offset_convert_to_data()

uint8_t mpu9250_accelerometer_offset_convert_to_data | ( | mpu9250_handle_t * | handle,
|  | int16_t | reg,
|  | float * | mg
| ) |  |

convert the register raw data to the accelerometer offset

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | reg | is the register raw data
  [out] | *mg | points to an accelerometer offset buffer

Returns
  status code
  - 0 success
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 9663 of file driver_mpu9250.c.

## ◆ mpu9250_accelerometer_offset_convert_to_register()

uint8_t mpu9250_accelerometer_offset_convert_to_register | ( | mpu9250_handle_t * | handle,
|  | float | mg,
|  | int16_t * | reg
| ) |  |

convert the accelerometer offset to the register raw data

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | mg | is the accelerometer offset
  [out] | *reg | points to a register raw buffer

Returns
  status code
  - 0 success
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 9636 of file driver_mpu9250.c.

## ◆ mpu9250_deinit()

uint8_t mpu9250_deinit | ( | mpu9250_handle_t * | handle | ) |

close the chip

Parameters

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

Returns
  status code
  - 0 success
  - 1 deinit failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 enter sleep mode failed

Note
  none

Definition at line 4168 of file driver_mpu9250.c.

## ◆ mpu9250_device_reset()

uint8_t mpu9250_device_reset | ( | mpu9250_handle_t * | handle | ) |

reset the chip

Parameters

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

Returns
  status code
  - 0 success
  - 1 device reset failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 6285 of file driver_mpu9250.c.

## ◆ mpu9250_fifo_get()

uint8_t mpu9250_fifo_get | ( | mpu9250_handle_t * | handle,
|  | uint8_t * | buf,
|  | uint16_t | len
| ) |  |

fifo read bytes

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [out] | *buf | points to a data buffer
  [in] | len | is the buffer length

Returns
  status code
  - 0 success
  - 1 fifo read failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 6899 of file driver_mpu9250.c.

## ◆ mpu9250_fifo_reset()

uint8_t mpu9250_fifo_reset | ( | mpu9250_handle_t * | handle | ) |

reset the fifo

Parameters

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

Returns
  status code
  - 0 success
  - 1 fifo reset failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 6042 of file driver_mpu9250.c.

## ◆ mpu9250_fifo_set()

uint8_t mpu9250_fifo_set | ( | mpu9250_handle_t * | handle,
|  | uint8_t * | buf,
|  | uint16_t | len
| ) |  |

fifo write bytes

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | *buf | points to a data buffer
  [in] | len | is the buffer length

Returns
  status code
  - 0 success
  - 1 fifo write failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 6935 of file driver_mpu9250.c.

## ◆ mpu9250_force_fifo_reset()

uint8_t mpu9250_force_fifo_reset | ( | mpu9250_handle_t * | handle | ) |

force reset the fifo

Parameters

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

Returns
  status code
  - 0 success
  - 1 force fifo reset failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 5844 of file driver_mpu9250.c.

## ◆ mpu9250_get_accel_compare_with_previous_sample()

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

get the accel compare with previous sample status

Parameters

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

Returns
  status code
  - 0 success
  - 1 get accel compare with previous sample failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 8177 of file driver_mpu9250.c.

## ◆ mpu9250_get_accelerometer_choice()

uint8_t mpu9250_get_accelerometer_choice | ( | mpu9250_handle_t * | handle,
|  | uint8_t * | choice
| ) |  |

get the accelerometer choice

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [out] | *choice | points to an accelerometer choice buffer

Returns
  status code
  - 0 success
  - 1 get accelerometer choice failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 choice > 3

Note
  none

Definition at line 7849 of file driver_mpu9250.c.

## ◆ mpu9250_get_accelerometer_low_pass_filter()

uint8_t mpu9250_get_accelerometer_low_pass_filter | ( | mpu9250_handle_t * | handle,
|  | mpu9250_accelerometer_low_pass_filter_t * | filter
| ) |  |

get the accelerometer low pass filter

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [out] | *filter | points to an accelerometer low pass filter buffer

Returns
  status code
  - 0 success
  - 1 get accelerometer low pass filter failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 7931 of file driver_mpu9250.c.

## ◆ mpu9250_get_accelerometer_range()

uint8_t mpu9250_get_accelerometer_range | ( | mpu9250_handle_t * | handle,
|  | mpu9250_accelerometer_range_t * | range
| ) |  |

get the accelerometer range

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [out] | *range | points to an accelerometer range buffer

Returns
  status code
  - 0 success
  - 1 get accelerometer range failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 7715 of file driver_mpu9250.c.

## ◆ mpu9250_get_accelerometer_test()

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

get the accelerometer test

Parameters

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

Returns
  status code
  - 0 success
  - 1 get accelerometer test failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 7633 of file driver_mpu9250.c.

## ◆ mpu9250_get_accelerometer_x_offset()

uint8_t mpu9250_get_accelerometer_x_offset | ( | mpu9250_handle_t * | handle,
|  | int16_t * | offset
| ) |  |

get the accelerometer x offset

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [out] | *offset | points to an accelerometer x offset buffer

Returns
  status code
  - 0 success
  - 1 get accelerometer x offset failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 9449 of file driver_mpu9250.c.

## ◆ mpu9250_get_accelerometer_x_test()

uint8_t mpu9250_get_accelerometer_x_test | ( | mpu9250_handle_t * | handle,
|  | uint8_t * | data
| ) |  |

get the accelerometer x test

Parameters

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

Returns
  status code
  - 0 success
  - 1 get accelerometer x test failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 9236 of file driver_mpu9250.c.

## ◆ mpu9250_get_accelerometer_y_offset()

uint8_t mpu9250_get_accelerometer_y_offset | ( | mpu9250_handle_t * | handle,
|  | int16_t * | offset
| ) |  |

get the accelerometer y offset

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [out] | *offset | points to an accelerometer y offset buffer

Returns
  status code
  - 0 success
  - 1 get accelerometer y offset failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 9524 of file driver_mpu9250.c.

## ◆ mpu9250_get_accelerometer_y_test()

uint8_t mpu9250_get_accelerometer_y_test | ( | mpu9250_handle_t * | handle,
|  | uint8_t * | data
| ) |  |

get the accelerometer y test

Parameters

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

Returns
  status code
  - 0 success
  - 1 get accelerometer y test failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 9306 of file driver_mpu9250.c.

## ◆ mpu9250_get_accelerometer_z_offset()

uint8_t mpu9250_get_accelerometer_z_offset | ( | mpu9250_handle_t * | handle,
|  | int16_t * | offset
| ) |  |

get the accelerometer z offset

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [out] | *offset | points to an accelerometer z offset buffer

Returns
  status code
  - 0 success
  - 1 get accelerometer z offset failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 9599 of file driver_mpu9250.c.

## ◆ mpu9250_get_accelerometer_z_test()

uint8_t mpu9250_get_accelerometer_z_test | ( | mpu9250_handle_t * | handle,
|  | uint8_t * | data
| ) |  |

get the accelerometer z test

Parameters

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

Returns
  status code
  - 0 success
  - 1 get accelerometer z test failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 9376 of file driver_mpu9250.c.

## ◆ mpu9250_get_addr_pin()

uint8_t mpu9250_get_addr_pin | ( | mpu9250_handle_t * | handle,
|  | mpu9250_address_t * | addr_pin
| ) |  |

get the chip address pin

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [out] | *addr_pin | points to a chip address pin buffer

Returns
  status code
  - 0 success
  - 2 handle is NULL

Note
  none

Definition at line 3985 of file driver_mpu9250.c.

## ◆ mpu9250_get_clock_source()

uint8_t mpu9250_get_clock_source | ( | mpu9250_handle_t * | handle,
|  | mpu9250_clock_source_t * | clock_source
| ) |  |

get the chip clock source

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [out] | *clock_source | points to a clock source buffer

Returns
  status code
  - 0 success
  - 1 get clock source failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 6412 of file driver_mpu9250.c.

## ◆ mpu9250_get_cycle_wake_up()

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

get the cycle wake up mode status

Parameters

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

Returns
  status code
  - 0 success
  - 1 get cycle wake up failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 6576 of file driver_mpu9250.c.

## ◆ mpu9250_get_device_reset()

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

get the device reset status

Parameters

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

Returns
  status code
  - 0 success
  - 1 get device reset failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 6330 of file driver_mpu9250.c.

## ◆ mpu9250_get_disable_iic_slave()

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

get the iic slave status

Parameters

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

Returns
  status code
  - 0 success
  - 1 get disable iic slave failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 6006 of file driver_mpu9250.c.

## ◆ mpu9250_get_extern_sync()

uint8_t mpu9250_get_extern_sync | ( | mpu9250_handle_t * | handle,
|  | mpu9250_extern_sync_t * | sync
| ) |  |

get the extern sync type

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [out] | *sync | points to an extern sync type buffer

Returns
  status code
  - 0 success
  - 1 get extern sync failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 7130 of file driver_mpu9250.c.

## ◆ mpu9250_get_fifo()

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

get the fifo status

Parameters

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

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

Note
  none

Definition at line 5808 of file driver_mpu9250.c.

## ◆ mpu9250_get_fifo_count()

uint8_t mpu9250_get_fifo_count | ( | mpu9250_handle_t * | handle,
|  | uint16_t * | count
| ) |  |

get the fifo counter value

Parameters

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

Returns
  status code
  - 0 success
  - 1 get fifo count failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 6861 of file driver_mpu9250.c.

## ◆ mpu9250_get_fifo_enable()

uint8_t mpu9250_get_fifo_enable | ( | mpu9250_handle_t * | handle,
|  | mpu9250_fifo_t | fifo,
|  | mpu9250_bool_t * | enable
| ) |  |

get the fifo function status

Parameters

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

Returns
  status code
  - 0 success
  - 1 get fifo enable failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 8261 of file driver_mpu9250.c.

## ◆ mpu9250_get_fifo_mode()

uint8_t mpu9250_get_fifo_mode | ( | mpu9250_handle_t * | handle,
|  | mpu9250_fifo_mode * | mode
| ) |  |

get the fifo mode

Parameters

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

Returns
  status code
  - 0 success
  - 1 get fifo mode failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 7294 of file driver_mpu9250.c.

## ◆ mpu9250_get_fifo_reset()

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

get the fifo reset status

Parameters

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

Returns
  status code
  - 0 success
  - 1 get fifo reset failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 6087 of file driver_mpu9250.c.

## ◆ mpu9250_get_fsync_interrupt()

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

get the fsync interrupt status

Parameters

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

Returns
  status code
  - 0 success
  - 1 get fsync interrupt failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 8753 of file driver_mpu9250.c.

## ◆ mpu9250_get_fsync_interrupt_level()

uint8_t mpu9250_get_fsync_interrupt_level | ( | mpu9250_handle_t * | handle,
|  | mpu9250_pin_level_t * | level
| ) |  |

get the fsync interrupt level

Parameters

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

Returns
  status code
  - 0 success
  - 1 get fsync interrupt level failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 8671 of file driver_mpu9250.c.

## ◆ mpu9250_get_gyro_standby()

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

get the gyro standby status

Parameters

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

Returns
  status code
  - 0 success
  - 1 get gyro standby failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 6740 of file driver_mpu9250.c.

## ◆ mpu9250_get_gyro_x_offset()

uint8_t mpu9250_get_gyro_x_offset | ( | mpu9250_handle_t * | handle,
|  | int16_t * | offset
| ) |  |

get the gyro x offset

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [out] | *offset | points to a gyro x offset buffer

Returns
  status code
  - 0 success
  - 1 get gyro x offset failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 9728 of file driver_mpu9250.c.

## ◆ mpu9250_get_gyro_y_offset()

uint8_t mpu9250_get_gyro_y_offset | ( | mpu9250_handle_t * | handle,
|  | int16_t * | offset
| ) |  |

get the gyro y offset

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [out] | *offset | points to a gyro y offset buffer

Returns
  status code
  - 0 success
  - 1 get gyro y offset failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 9803 of file driver_mpu9250.c.

## ◆ mpu9250_get_gyro_z_offset()

uint8_t mpu9250_get_gyro_z_offset | ( | mpu9250_handle_t * | handle,
|  | int16_t * | offset
| ) |  |

get the gyro z offset

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [out] | *offset | points to a gyro z offset buffer

Returns
  status code
  - 0 success
  - 1 get gyro z offset failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 9878 of file driver_mpu9250.c.

## ◆ mpu9250_get_gyroscope_choice()

uint8_t mpu9250_get_gyroscope_choice | ( | mpu9250_handle_t * | handle,
|  | uint8_t * | choice
| ) |  |

get the gyroscope choice

Parameters

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

Returns
  status code
  - 0 success
  - 1 get gyroscope choice failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 7549 of file driver_mpu9250.c.

## ◆ mpu9250_get_gyroscope_range()

uint8_t mpu9250_get_gyroscope_range | ( | mpu9250_handle_t * | handle,
|  | mpu9250_gyroscope_range_t * | range
| ) |  |

get the gyroscope range

Parameters

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

Returns
  status code
  - 0 success
  - 1 get gyroscope range failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 7460 of file driver_mpu9250.c.

## ◆ mpu9250_get_gyroscope_test()

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

get the gyroscope test

Parameters

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

Returns
  status code
  - 0 success
  - 1 get gyroscope test failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 7378 of file driver_mpu9250.c.

## ◆ mpu9250_get_gyroscope_x_test()

uint8_t mpu9250_get_gyroscope_x_test | ( | mpu9250_handle_t * | handle,
|  | uint8_t * | data
| ) |  |

get the gyroscope x test

Parameters

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

Returns
  status code
  - 0 success
  - 1 get gyroscope x test failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 9026 of file driver_mpu9250.c.

## ◆ mpu9250_get_gyroscope_y_test()

uint8_t mpu9250_get_gyroscope_y_test | ( | mpu9250_handle_t * | handle,
|  | uint8_t * | data
| ) |  |

get the gyroscope y test

Parameters

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

Returns
  status code
  - 0 success
  - 1 get gyroscope y test failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 9096 of file driver_mpu9250.c.

## ◆ mpu9250_get_gyroscope_z_test()

uint8_t mpu9250_get_gyroscope_z_test | ( | mpu9250_handle_t * | handle,
|  | uint8_t * | data
| ) |  |

get the gyroscope z test

Parameters

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

Returns
  status code
  - 0 success
  - 1 get gyroscope z test failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 9166 of file driver_mpu9250.c.

## ◆ mpu9250_get_iic4_data_in()

uint8_t mpu9250_get_iic4_data_in | ( | mpu9250_handle_t * | handle,
|  | uint8_t * | data
| ) |  |

get the iic4 data in

Parameters

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

Returns
  status code
  - 0 success
  - 1 get iic4 data in failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 12954 of file driver_mpu9250.c.

## ◆ mpu9250_get_iic4_data_out()

uint8_t mpu9250_get_iic4_data_out | ( | mpu9250_handle_t * | handle,
|  | uint8_t * | data
| ) |  |

get the iic4 data out

Parameters

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

Returns
  status code
  - 0 success
  - 1 get iic4 data out failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 12884 of file driver_mpu9250.c.

## ◆ mpu9250_get_iic4_enable()

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

get the iic4 status

Parameters

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

Returns
  status code
  - 0 success
  - 1 get iic4 enable failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 12559 of file driver_mpu9250.c.

## ◆ mpu9250_get_iic4_interrupt()

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

get the iic4 interrupt status

Parameters

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

Returns
  status code
  - 0 success
  - 1 get iic4 interrupt failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 12641 of file driver_mpu9250.c.

## ◆ mpu9250_get_iic4_transaction_mode()

uint8_t mpu9250_get_iic4_transaction_mode | ( | mpu9250_handle_t * | handle,
|  | mpu9250_iic4_transaction_mode_t * | mode
| ) |  |

get the iic4 transaction mode

Parameters

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

Returns
  status code
  - 0 success
  - 1 get iic4 transaction mode failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 12723 of file driver_mpu9250.c.

## ◆ mpu9250_get_iic_address()

uint8_t mpu9250_get_iic_address | ( | mpu9250_handle_t * | handle,
|  | mpu9250_iic_slave_t | slave,
|  | uint8_t * | addr_7bit
| ) |  |

get the iic address

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | slave | is the iic slave number
  [out] | *addr_7bit | points to an iic address buffer

Returns
  status code
  - 0 success
  - 1 get iic address failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 invalid slave

Note
  none

Definition at line 11004 of file driver_mpu9250.c.

## ◆ mpu9250_get_iic_bypass()

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

get the iic bypass status

Parameters

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

Returns
  status code
  - 0 success
  - 1 get iic bypass failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 8835 of file driver_mpu9250.c.

## ◆ mpu9250_get_iic_byte_swap()

uint8_t mpu9250_get_iic_byte_swap | ( | mpu9250_handle_t * | handle,
|  | mpu9250_iic_slave_t | slave,
|  | mpu9250_bool_t * | enable
| ) |  |

get the iic byte swap status

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | slave | is the iic slave number
  [out] | *enable | points to a bool value buffer

Returns
  status code
  - 0 success
  - 1 get iic byte swap failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 invalid slave

Note
  none

Definition at line 11727 of file driver_mpu9250.c.

## ◆ mpu9250_get_iic_clock()

uint8_t mpu9250_get_iic_clock | ( | mpu9250_handle_t * | handle,
|  | mpu9250_iic_clock_t * | clk
| ) |  |

get the iic clock

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [out] | *clk | points to an iic clock buffer

Returns
  status code
  - 0 success
  - 1 get iic clock failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 10223 of file driver_mpu9250.c.

## ◆ mpu9250_get_iic_data_out()

uint8_t mpu9250_get_iic_data_out | ( | mpu9250_handle_t * | handle,
|  | mpu9250_iic_slave_t | slave,
|  | uint8_t * | data
| ) |  |

get the iic data out

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | slave | is the iic slave number
  [out] | *data | points to a set data buffer

Returns
  status code
  - 0 success
  - 1 get iic data out failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 invalid slave

Note
  none

Definition at line 11344 of file driver_mpu9250.c.

## ◆ mpu9250_get_iic_delay()

uint8_t mpu9250_get_iic_delay | ( | mpu9250_handle_t * | handle,
|  | uint8_t * | delay
| ) |  |

get the iic delay

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [out] | *delay | points to an iic delay buffer

Returns
  status code
  - 0 success
  - 1 get iic delay failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 12812 of file driver_mpu9250.c.

## ◆ mpu9250_get_iic_delay_enable()

uint8_t mpu9250_get_iic_delay_enable | ( | mpu9250_handle_t * | handle,
|  | mpu9250_iic_delay_t | delay,
|  | mpu9250_bool_t * | enable
| ) |  |

get the iic delay status

Parameters

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

Returns
  status code
  - 0 success
  - 1 get iic delay enable failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 12477 of file driver_mpu9250.c.

## ◆ mpu9250_get_iic_enable()

uint8_t mpu9250_get_iic_enable | ( | mpu9250_handle_t * | handle,
|  | mpu9250_iic_slave_t | slave,
|  | mpu9250_bool_t * | enable
| ) |  |

get the iic status

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | slave | is the iic slave number
  [out] | *enable | points to a bool value buffer

Returns
  status code
  - 0 success
  - 1 get iic enable failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 invalid slave

Note
  none

Definition at line 11533 of file driver_mpu9250.c.

## ◆ mpu9250_get_iic_fifo_enable()

uint8_t mpu9250_get_iic_fifo_enable | ( | mpu9250_handle_t * | handle,
|  | mpu9250_iic_slave_t | slave,
|  | mpu9250_bool_t * | enable
| ) |  |

get the iic fifo status

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | slave | is the iic slave number
  [out] | *enable | points to a bool value buffer

Returns
  status code
  - 0 success
  - 1 get iic fifo enable failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 invalid slave

Note
  none

Definition at line 10586 of file driver_mpu9250.c.

## ◆ mpu9250_get_iic_group_order()

uint8_t mpu9250_get_iic_group_order | ( | mpu9250_handle_t * | handle,
|  | mpu9250_iic_slave_t | slave,
|  | mpu9250_iic_group_order_t * | order
| ) |  |

get the iic group order

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | slave | is the iic slave number
  [out] | *order | points to a group order buffer

Returns
  status code
  - 0 success
  - 1 get iic group order failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 invalid slave

Note
  none

Definition at line 12115 of file driver_mpu9250.c.

## ◆ mpu9250_get_iic_master()

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

get the iic master status

Parameters

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

Returns
  status code
  - 0 success
  - 1 get iic master failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 5924 of file driver_mpu9250.c.

## ◆ mpu9250_get_iic_master_reset()

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

get the iic master reset status

Parameters

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

Returns
  status code
  - 0 success
  - 1 get iic master reset failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 6168 of file driver_mpu9250.c.

## ◆ mpu9250_get_iic_mode()

uint8_t mpu9250_get_iic_mode | ( | mpu9250_handle_t * | handle,
|  | mpu9250_iic_slave_t | slave,
|  | mpu9250_iic_mode_t * | mode
| ) |  |

get the iic mode

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | slave | is the iic slave number
  [out] | *mode | points to an iic mode buffer

Returns
  status code
  - 0 success
  - 1 get iic mode failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 invalid slave

Note
  none

Definition at line 10780 of file driver_mpu9250.c.

## ◆ mpu9250_get_iic_multi_master()

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

get the iic multi master status

Parameters

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

Returns
  status code
  - 0 success
  - 1 get iic multi master failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 10305 of file driver_mpu9250.c.

## ◆ mpu9250_get_iic_read_mode()

uint8_t mpu9250_get_iic_read_mode | ( | mpu9250_handle_t * | handle,
|  | mpu9250_iic_read_mode_t * | mode
| ) |  |

get the iic read mode

Parameters

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

Returns
  status code
  - 0 success
  - 1 get iic read mode failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 10469 of file driver_mpu9250.c.

## ◆ mpu9250_get_iic_register()

uint8_t mpu9250_get_iic_register | ( | mpu9250_handle_t * | handle,
|  | mpu9250_iic_slave_t | slave,
|  | uint8_t * | reg
| ) |  |

get the iic register

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | slave | is the iic slave number
  [out] | *reg | points to an iic register buffer

Returns
  status code
  - 0 success
  - 1 get iic register failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 invalid slave

Note
  none

Definition at line 11182 of file driver_mpu9250.c.

## ◆ mpu9250_get_iic_status()

uint8_t mpu9250_get_iic_status | ( | mpu9250_handle_t * | handle,
|  | uint8_t * | status
| ) |  |

get the iic status

Parameters

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

Returns
  status code
  - 0 success
  - 1 get iic status failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 12395 of file driver_mpu9250.c.

## ◆ mpu9250_get_iic_transaction_mode()

uint8_t mpu9250_get_iic_transaction_mode | ( | mpu9250_handle_t * | handle,
|  | mpu9250_iic_slave_t | slave,
|  | mpu9250_iic_transaction_mode_t * | mode
| ) |  |

get the iic transaction mode

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | slave | is the iic slave number
  [out] | *mode | points to an iic transaction mode buffer

Returns
  status code
  - 0 success
  - 1 get iic transaction mode failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 invalid slave

Note
  none

Definition at line 11921 of file driver_mpu9250.c.

## ◆ mpu9250_get_iic_transferred_len()

uint8_t mpu9250_get_iic_transferred_len | ( | mpu9250_handle_t * | handle,
|  | mpu9250_iic_slave_t | slave,
|  | uint8_t * | len
| ) |  |

get the iic transferred length

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | slave | is the iic slave number
  [out] | *len | points to an iic transferred length buffer

Returns
  status code
  - 0 success
  - 1 get iic transferred len failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 invalid slave

Note
  none

Definition at line 12316 of file driver_mpu9250.c.

## ◆ mpu9250_get_iic_wait_for_external_sensor()

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

get the iic wait for external sensor status

Parameters

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

Returns
  status code
  - 0 success
  - 1 get iic wait for external sensor failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 10387 of file driver_mpu9250.c.

## ◆ mpu9250_get_interface()

uint8_t mpu9250_get_interface | ( | mpu9250_handle_t * | handle,
|  | mpu9250_interface_t * | interface
| ) |  |

get the chip interface

Parameters

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

Returns
  status code
  - 0 success
  - 2 handle is NULL

Note
  none

Definition at line 3943 of file driver_mpu9250.c.

## ◆ mpu9250_get_interrupt()

uint8_t mpu9250_get_interrupt | ( | mpu9250_handle_t * | handle,
|  | mpu9250_interrupt_t | type,
|  | mpu9250_bool_t * | enable
| ) |  |

get the interrupt status

Parameters

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

Returns
  status code
  - 0 success
  - 1 get interrupt failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 8919 of file driver_mpu9250.c.

## ◆ mpu9250_get_interrupt_latch()

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

get the interrupt latch status

Parameters

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

Returns
  status code
  - 0 success
  - 1 get interrupt latch failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 8507 of file driver_mpu9250.c.

## ◆ mpu9250_get_interrupt_level()

uint8_t mpu9250_get_interrupt_level | ( | mpu9250_handle_t * | handle,
|  | mpu9250_pin_level_t * | level
| ) |  |

get the interrupt level

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [out] | *level | points to an interrupt level buffer

Returns
  status code
  - 0 success
  - 1 get interrupt level failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 8343 of file driver_mpu9250.c.

## ◆ mpu9250_get_interrupt_pin_type()

uint8_t mpu9250_get_interrupt_pin_type | ( | mpu9250_handle_t * | handle,
|  | mpu9250_pin_type_t * | type
| ) |  |

get the interrupt pin type

Parameters

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

Returns
  status code
  - 0 success
  - 1 get interrupt pin type failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 8425 of file driver_mpu9250.c.

## ◆ mpu9250_get_interrupt_read_clear()

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

get the interrupt reading clear status

Parameters

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

Returns
  status code
  - 0 success
  - 1 get interrupt read clear failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 8589 of file driver_mpu9250.c.

## ◆ mpu9250_get_interrupt_status()

uint8_t mpu9250_get_interrupt_status | ( | mpu9250_handle_t * | handle,
|  | uint8_t * | status
| ) |  |

get the interrupt status

Parameters

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

Returns
  status code
  - 0 success
  - 1 get interrupt status failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 8956 of file driver_mpu9250.c.

## ◆ mpu9250_get_low_pass_filter()

uint8_t mpu9250_get_low_pass_filter | ( | mpu9250_handle_t * | handle,
|  | mpu9250_low_pass_filter_t * | filter
| ) |  |

get the low pass filter

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [out] | *filter | points to a low pass filter buffer

Returns
  status code
  - 0 success
  - 1 get low pass filter failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 7212 of file driver_mpu9250.c.

## ◆ mpu9250_get_low_power_accel_output_rate()

uint8_t mpu9250_get_low_power_accel_output_rate | ( | mpu9250_handle_t * | handle,
|  | mpu9250_low_power_accel_output_rate_t * | rate
| ) |  |

get the low power accel output rate

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [out] | *rate | points to a low power accel output rate buffer

Returns
  status code
  - 0 success
  - 1 get low power accel output rate failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 8013 of file driver_mpu9250.c.

## ◆ mpu9250_get_motion_threshold()

uint8_t mpu9250_get_motion_threshold | ( | mpu9250_handle_t * | handle,
|  | uint8_t * | threshold
| ) |  |

get the motion_threshold

Parameters

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

Returns
  status code
  - 0 success
  - 1 get motion threshold failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 10004 of file driver_mpu9250.c.

## ◆ mpu9250_get_ptat()

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

get the temperature sensor status

Parameters

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

Returns
  status code
  - 0 success
  - 1 get temperature sensor failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 6494 of file driver_mpu9250.c.

## ◆ mpu9250_get_sample_rate_divider()

uint8_t mpu9250_get_sample_rate_divider | ( | mpu9250_handle_t * | handle,
|  | uint8_t * | d
| ) |  |

get the sample rate divider

Parameters

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

Returns
  status code
  - 0 success
  - 1 get sample rate divider failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 7050 of file driver_mpu9250.c.

## ◆ mpu9250_get_sensor_reset()

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

get the sensor reset status

Parameters

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

Returns
  status code
  - 0 success
  - 1 get sensor reset failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 6249 of file driver_mpu9250.c.

## ◆ mpu9250_get_sleep()

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

get the sleep status

Parameters

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

Returns
  status code
  - 0 success
  - 1 get sleep failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 6658 of file driver_mpu9250.c.

## ◆ mpu9250_get_standby_mode()

uint8_t mpu9250_get_standby_mode | ( | mpu9250_handle_t * | handle,
|  | mpu9250_source_t | source,
|  | mpu9250_bool_t * | enable
| ) |  |

get the source mode

Parameters

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

Returns
  status code
  - 0 success
  - 1 get standby mode failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 6824 of file driver_mpu9250.c.

## ◆ mpu9250_get_wake_on_motion()

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

get the wake on motion status

Parameters

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

Returns
  status code
  - 0 success
  - 1 get wake on motion failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 8095 of file driver_mpu9250.c.

## ◆ mpu9250_gyro_offset_convert_to_data()

uint8_t mpu9250_gyro_offset_convert_to_data | ( | mpu9250_handle_t * | handle,
|  | int16_t | reg,
|  | float * | dps
| ) |  |

convert the register raw data to the gyro offset

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | reg | is the register raw data
  [out] | *dps | points to a gyro offset buffer

Returns
  status code
  - 0 success
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 9942 of file driver_mpu9250.c.

## ◆ mpu9250_gyro_offset_convert_to_register()

uint8_t mpu9250_gyro_offset_convert_to_register | ( | mpu9250_handle_t * | handle,
|  | float | dps,
|  | int16_t * | reg
| ) |  |

convert the gyro offset to the register raw data

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | dps | is the gyro offset
  [out] | *reg | points to a register raw buffer

Returns
  status code
  - 0 success
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 9915 of file driver_mpu9250.c.

## ◆ mpu9250_iic_master_reset()

uint8_t mpu9250_iic_master_reset | ( | mpu9250_handle_t * | handle | ) |

reset the iic master controller

Parameters

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

Returns
  status code
  - 0 success
  - 1 iic master reset failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 6123 of file driver_mpu9250.c.

## ◆ mpu9250_info()

uint8_t mpu9250_info | ( | mpu9250_info_t * | info | ) |

get the chip's information

Parameters

  [out] | *info | points to an mpu9250 info structure

Returns
  status code
  - 0 success
  - 2 handle is NULL

Note
  none

Definition at line 13083 of file driver_mpu9250.c.

## ◆ mpu9250_init()

uint8_t mpu9250_init | ( | mpu9250_handle_t * | handle | ) |

initialize the chip

Parameters

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

Returns
  status code
  - 0 success
  - 1 iic or spi initialization failed
  - 2 handle is NULL
  - 3 linked functions is NULL
  - 4 reset failed
  - 5 id is invalid

Note
  none

Definition at line 4009 of file driver_mpu9250.c.

## ◆ mpu9250_irq_handler()

uint8_t mpu9250_irq_handler | ( | mpu9250_handle_t * | handle | ) |

irq handler

Parameters

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

Returns
  status code
  - 0 success
  - 1 run failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 4668 of file driver_mpu9250.c.

## ◆ mpu9250_motion_threshold_convert_to_data()

uint8_t mpu9250_motion_threshold_convert_to_data | ( | mpu9250_handle_t * | handle,
|  | uint8_t | reg,
|  | float * | mg
| ) |  |

convert the register raw data to the motion threshold

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | reg | is the register raw data
  [out] | *mg | points to a motion threshold buffer

Returns
  status code
  - 0 success
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 10066 of file driver_mpu9250.c.

## ◆ mpu9250_motion_threshold_convert_to_register()

uint8_t mpu9250_motion_threshold_convert_to_register | ( | mpu9250_handle_t * | handle,
|  | float | mg,
|  | uint8_t * | reg
| ) |  |

convert the motion threshold to the register raw data

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | mg | is the motion threshold
  [out] | *reg | points to a register raw buffer

Returns
  status code
  - 0 success
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 10039 of file driver_mpu9250.c.

## ◆ mpu9250_read()

uint8_t mpu9250_read | ( | mpu9250_handle_t * | handle,
|  | int16_t(*) | accel_raw[3],
|  | float(*) | accel_g[3],
|  | int16_t(*) | gyro_raw[3],
|  | float(*) | gyro_dps[3],
|  | int16_t(*) | mag_raw[3],
|  | float(*) | mag_ut[3],
|  | uint16_t * | len
| ) |  |

read the data

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [out] | **accel_raw | points to an accel raw data buffer
  [out] | **accel_g | points to a converted accel data buffer
  [out] | **gyro_raw | points to a gyro raw data buffer
  [out] | **gyro_dps | points to a converted gyro data buffer
  [out] | **mag_raw | points to a mag raw data buffer
  [out] | **mag_ut | points to a converted mag data buffer
  [in,out] | *len | points to a length buffer

Returns
  status code
  - 0 success
  - 1 read failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 length is zero
  - 5 dmp is running
  - 6 fifo conf is error

Note
  spi can't read mag data

Definition at line 4223 of file driver_mpu9250.c.

## ◆ mpu9250_read_extern_sensor_data()

uint8_t mpu9250_read_extern_sensor_data | ( | mpu9250_handle_t * | handle,
|  | uint8_t * | data,
|  | uint8_t | len
| ) |  |

read the extern sensor data

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [out] | *data | points to a data buffer
  [in] | len | is the data length

Returns
  status code
  - 0 success
  - 1 read extern sensor data failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 len > 24

Note
  none

Definition at line 12991 of file driver_mpu9250.c.

## ◆ mpu9250_read_temperature()

uint8_t mpu9250_read_temperature | ( | mpu9250_handle_t * | handle,
|  | int16_t * | raw,
|  | float * | degrees
| ) |  |

read the temperature

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [out] | *raw | points to raw data buffer
  [out] | *degrees | points to a converted degrees data buffer

Returns
  status code
  - 0 success
  - 1 read failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 4631 of file driver_mpu9250.c.

## ◆ mpu9250_self_test()

uint8_t mpu9250_self_test | ( | mpu9250_handle_t * | handle,
|  | int32_t | gyro_offset_raw[3],
|  | int32_t | accel_offset_raw[3]
| ) |  |

run the self test

Parameters

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

Returns
  status code
  - 0 success
  - 1 self test failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 10094 of file driver_mpu9250.c.

## ◆ mpu9250_sensor_reset()

uint8_t mpu9250_sensor_reset | ( | mpu9250_handle_t * | handle | ) |

reset all sensors

Parameters

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

Returns
  status code
  - 0 success
  - 1 sensor reset failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 6204 of file driver_mpu9250.c.

## ◆ mpu9250_set_accel_compare_with_previous_sample()

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

enable or disable accel compare with previous sample

Parameters

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

Returns
  status code
  - 0 success
  - 1 set accel compare with previous sample failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 8132 of file driver_mpu9250.c.

## ◆ mpu9250_set_accelerometer_choice()

uint8_t mpu9250_set_accelerometer_choice | ( | mpu9250_handle_t * | handle,
|  | uint8_t | choice
| ) |  |

set the accelerometer choice

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | choice | is the accelerometer choice

Returns
  status code
  - 0 success
  - 1 set accelerometer choice failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 choice > 1

Note
  none

Definition at line 7797 of file driver_mpu9250.c.

## ◆ mpu9250_set_accelerometer_low_pass_filter()

uint8_t mpu9250_set_accelerometer_low_pass_filter | ( | mpu9250_handle_t * | handle,
|  | mpu9250_accelerometer_low_pass_filter_t | filter
| ) |  |

set the accelerometer low pass filter

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | filter | is the accelerometer low pass filter

Returns
  status code
  - 0 success
  - 1 set accelerometer low pass filter failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 7886 of file driver_mpu9250.c.

## ◆ mpu9250_set_accelerometer_range()

uint8_t mpu9250_set_accelerometer_range | ( | mpu9250_handle_t * | handle,
|  | mpu9250_accelerometer_range_t | range
| ) |  |

set the accelerometer range

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | range | is the accelerometer range

Returns
  status code
  - 0 success
  - 1 set accelerometer range failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 7670 of file driver_mpu9250.c.

## ◆ mpu9250_set_accelerometer_test()

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

set the accelerometer test

Parameters

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

Returns
  status code
  - 0 success
  - 1 set accelerometer test failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 7587 of file driver_mpu9250.c.

## ◆ mpu9250_set_accelerometer_x_offset()

uint8_t mpu9250_set_accelerometer_x_offset | ( | mpu9250_handle_t * | handle,
|  | int16_t | offset
| ) |  |

set the accelerometer x offset

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | offset | is the accelerometer x offset

Returns
  status code
  - 0 success
  - 1 set accelerometer x offset failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 9411 of file driver_mpu9250.c.

## ◆ mpu9250_set_accelerometer_x_test()

uint8_t mpu9250_set_accelerometer_x_test | ( | mpu9250_handle_t * | handle,
|  | uint8_t | data
| ) |  |

set the accelerometer x test

Parameters

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

Returns
  status code
  - 0 success
  - 1 set accelerometer x test failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 9201 of file driver_mpu9250.c.

## ◆ mpu9250_set_accelerometer_y_offset()

uint8_t mpu9250_set_accelerometer_y_offset | ( | mpu9250_handle_t * | handle,
|  | int16_t | offset
| ) |  |

set the accelerometer y offset

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | offset | is the accelerometer y offset

Returns
  status code
  - 0 success
  - 1 set accelerometer y offset failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 9486 of file driver_mpu9250.c.

## ◆ mpu9250_set_accelerometer_y_test()

uint8_t mpu9250_set_accelerometer_y_test | ( | mpu9250_handle_t * | handle,
|  | uint8_t | data
| ) |  |

set the accelerometer y test

Parameters

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

Returns
  status code
  - 0 success
  - 1 set accelerometer y test failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 9271 of file driver_mpu9250.c.

## ◆ mpu9250_set_accelerometer_z_offset()

uint8_t mpu9250_set_accelerometer_z_offset | ( | mpu9250_handle_t * | handle,
|  | int16_t | offset
| ) |  |

set the accelerometer z offset

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | offset | is the accelerometer z offset

Returns
  status code
  - 0 success
  - 1 set accelerometer z offset failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 9561 of file driver_mpu9250.c.

## ◆ mpu9250_set_accelerometer_z_test()

uint8_t mpu9250_set_accelerometer_z_test | ( | mpu9250_handle_t * | handle,
|  | uint8_t | data
| ) |  |

set the accelerometer z test

Parameters

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

Returns
  status code
  - 0 success
  - 1 set accelerometer z test failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 9341 of file driver_mpu9250.c.

## ◆ mpu9250_set_addr_pin()

uint8_t mpu9250_set_addr_pin | ( | mpu9250_handle_t * | handle,
|  | mpu9250_address_t | addr_pin
| ) |  |

set the chip address pin

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | addr_pin | is the chip address pin

Returns
  status code
  - 0 success
  - 2 handle is NULL

Note
  none

Definition at line 3964 of file driver_mpu9250.c.

## ◆ mpu9250_set_clock_source()

uint8_t mpu9250_set_clock_source | ( | mpu9250_handle_t * | handle,
|  | mpu9250_clock_source_t | clock_source
| ) |  |

set the chip clock source

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | clock_source | is chip main clock source

Returns
  status code
  - 0 success
  - 1 set clock source failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 6367 of file driver_mpu9250.c.

## ◆ mpu9250_set_cycle_wake_up()

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

enable or disable the cycle wake up mode

Parameters

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

Returns
  status code
  - 0 success
  - 1 set cycle wake up failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 6531 of file driver_mpu9250.c.

## ◆ mpu9250_set_disable_iic_slave()

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

enable or disable the iic slave mode

Parameters

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

Returns
  status code
  - 0 success
  - 1 set disable iic slave failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 5961 of file driver_mpu9250.c.

## ◆ mpu9250_set_extern_sync()

uint8_t mpu9250_set_extern_sync | ( | mpu9250_handle_t * | handle,
|  | mpu9250_extern_sync_t | sync
| ) |  |

set the extern sync type

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | sync | is the extern sync type

Returns
  status code
  - 0 success
  - 1 set extern sync failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 7085 of file driver_mpu9250.c.

## ◆ mpu9250_set_fifo()

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

enable or disable fifo

Parameters

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

Returns
  status code
  - 0 success
  - 1 set fifo failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 5763 of file driver_mpu9250.c.

## ◆ mpu9250_set_fifo_1024kb()

uint8_t mpu9250_set_fifo_1024kb | ( | mpu9250_handle_t * | handle | ) |

set fifo 1024kb

Parameters

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

Returns
  status code
  - 0 success
  - 1 set fifo 1024kb failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 7751 of file driver_mpu9250.c.

## ◆ mpu9250_set_fifo_enable()

uint8_t mpu9250_set_fifo_enable | ( | mpu9250_handle_t * | handle,
|  | mpu9250_fifo_t | fifo,
|  | mpu9250_bool_t | enable
| ) |  |

enable or disable the fifo function

Parameters

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

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

Note
  none

Definition at line 8215 of file driver_mpu9250.c.

## ◆ mpu9250_set_fifo_mode()

uint8_t mpu9250_set_fifo_mode | ( | mpu9250_handle_t * | handle,
|  | mpu9250_fifo_mode | mode
| ) |  |

set the fifo mode

Parameters

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

Returns
  status code
  - 0 success
  - 1 set fifo mode failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 7249 of file driver_mpu9250.c.

## ◆ mpu9250_set_fsync_interrupt()

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

enable or disable the fsync interrupt

Parameters

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

Returns
  status code
  - 0 success
  - 1 set fsync interrupt failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 8708 of file driver_mpu9250.c.

## ◆ mpu9250_set_fsync_interrupt_level()

uint8_t mpu9250_set_fsync_interrupt_level | ( | mpu9250_handle_t * | handle,
|  | mpu9250_pin_level_t | level
| ) |  |

set the fsync interrupt level

Parameters

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

Returns
  status code
  - 0 success
  - 1 set fsync interrupt level failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 8626 of file driver_mpu9250.c.

## ◆ mpu9250_set_gyro_standby()

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

enable or disable the gyro standby

Parameters

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

Returns
  status code
  - 0 success
  - 1 set gyro standby failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 6695 of file driver_mpu9250.c.

## ◆ mpu9250_set_gyro_x_offset()

uint8_t mpu9250_set_gyro_x_offset | ( | mpu9250_handle_t * | handle,
|  | int16_t | offset
| ) |  |

set the gyro x offset

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | offset | is the gyro x offset

Returns
  status code
  - 0 success
  - 1 set gyro x offset failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 9690 of file driver_mpu9250.c.

## ◆ mpu9250_set_gyro_y_offset()

uint8_t mpu9250_set_gyro_y_offset | ( | mpu9250_handle_t * | handle,
|  | int16_t | offset
| ) |  |

set the gyro y offset

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | offset | is the gyro y offset

Returns
  status code
  - 0 success
  - 1 set gyro y offset failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 9765 of file driver_mpu9250.c.

## ◆ mpu9250_set_gyro_z_offset()

uint8_t mpu9250_set_gyro_z_offset | ( | mpu9250_handle_t * | handle,
|  | int16_t | offset
| ) |  |

set the gyro z offset

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | offset | is the gyro z offset

Returns
  status code
  - 0 success
  - 1 set gyro z offset failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 9840 of file driver_mpu9250.c.

## ◆ mpu9250_set_gyroscope_choice()

uint8_t mpu9250_set_gyroscope_choice | ( | mpu9250_handle_t * | handle,
|  | uint8_t | choice
| ) |  |

set the gyroscope choice

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | choice | is the gyroscope choice

Returns
  status code
  - 0 success
  - 1 set gyroscope choice failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 choice > 3

Note
  none

Definition at line 7498 of file driver_mpu9250.c.

## ◆ mpu9250_set_gyroscope_range()

uint8_t mpu9250_set_gyroscope_range | ( | mpu9250_handle_t * | handle,
|  | mpu9250_gyroscope_range_t | range
| ) |  |

set the gyroscope range

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | range | is the gyroscope range

Returns
  status code
  - 0 success
  - 1 set gyroscope range failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 7415 of file driver_mpu9250.c.

## ◆ mpu9250_set_gyroscope_test()

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

set the gyroscope test

Parameters

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

Returns
  status code
  - 0 success
  - 1 set gyroscope test failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 7332 of file driver_mpu9250.c.

## ◆ mpu9250_set_gyroscope_x_test()

uint8_t mpu9250_set_gyroscope_x_test | ( | mpu9250_handle_t * | handle,
|  | uint8_t | data
| ) |  |

set the gyroscope x test

Parameters

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

Returns
  status code
  - 0 success
  - 1 set gyroscope x test failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 8991 of file driver_mpu9250.c.

## ◆ mpu9250_set_gyroscope_y_test()

uint8_t mpu9250_set_gyroscope_y_test | ( | mpu9250_handle_t * | handle,
|  | uint8_t | data
| ) |  |

set the gyroscope y test

Parameters

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

Returns
  status code
  - 0 success
  - 1 set gyroscope y test failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 9061 of file driver_mpu9250.c.

## ◆ mpu9250_set_gyroscope_z_test()

uint8_t mpu9250_set_gyroscope_z_test | ( | mpu9250_handle_t * | handle,
|  | uint8_t | data
| ) |  |

set the gyroscope z test

Parameters

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

Returns
  status code
  - 0 success
  - 1 set gyroscope z test failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 9131 of file driver_mpu9250.c.

## ◆ mpu9250_set_iic4_data_in()

uint8_t mpu9250_set_iic4_data_in | ( | mpu9250_handle_t * | handle,
|  | uint8_t | data
| ) |  |

set the iic4 data in

Parameters

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

Returns
  status code
  - 0 success
  - 1 set iic4 data in failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 12919 of file driver_mpu9250.c.

## ◆ mpu9250_set_iic4_data_out()

uint8_t mpu9250_set_iic4_data_out | ( | mpu9250_handle_t * | handle,
|  | uint8_t | data
| ) |  |

set the iic4 data out

Parameters

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

Returns
  status code
  - 0 success
  - 1 set iic4 data out failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 12849 of file driver_mpu9250.c.

## ◆ mpu9250_set_iic4_enable()

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

enable or disable the iic4

Parameters

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

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

Note
  none

Definition at line 12514 of file driver_mpu9250.c.

## ◆ mpu9250_set_iic4_interrupt()

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

enable or disable the iic4 interrupt

Parameters

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

Returns
  status code
  - 0 success
  - 1 set iic4 interrupt failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 12596 of file driver_mpu9250.c.

## ◆ mpu9250_set_iic4_transaction_mode()

uint8_t mpu9250_set_iic4_transaction_mode | ( | mpu9250_handle_t * | handle,
|  | mpu9250_iic4_transaction_mode_t | mode
| ) |  |

set the iic4 transaction mode

Parameters

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

Returns
  status code
  - 0 success
  - 1 set iic4 transaction mode failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 12678 of file driver_mpu9250.c.

## ◆ mpu9250_set_iic_address()

uint8_t mpu9250_set_iic_address | ( | mpu9250_handle_t * | handle,
|  | mpu9250_iic_slave_t | slave,
|  | uint8_t | addr_7bit
| ) |  |

set the iic address

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | slave | is the iic slave number
  [in] | addr_7bit | is the iic address

Returns
  status code
  - 0 success
  - 1 set iic address failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 invalid slave

Note
  none

Definition at line 10872 of file driver_mpu9250.c.

## ◆ mpu9250_set_iic_bypass()

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

enable or disable the iic bypass

Parameters

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

Returns
  status code
  - 0 success
  - 1 set iic bypass failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 8790 of file driver_mpu9250.c.

## ◆ mpu9250_set_iic_byte_swap()

uint8_t mpu9250_set_iic_byte_swap | ( | mpu9250_handle_t * | handle,
|  | mpu9250_iic_slave_t | slave,
|  | mpu9250_bool_t | enable
| ) |  |

enable or disable the iic byte swap

Parameters

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

Returns
  status code
  - 0 success
  - 1 set iic byte swap failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 invalid slave

Note
  none

Definition at line 11614 of file driver_mpu9250.c.

## ◆ mpu9250_set_iic_clock()

uint8_t mpu9250_set_iic_clock | ( | mpu9250_handle_t * | handle,
|  | mpu9250_iic_clock_t | clk
| ) |  |

set the iic clock

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | clk | is the iic clock

Returns
  status code
  - 0 success
  - 1 set iic clock failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 10178 of file driver_mpu9250.c.

## ◆ mpu9250_set_iic_data_out()

uint8_t mpu9250_set_iic_data_out | ( | mpu9250_handle_t * | handle,
|  | mpu9250_iic_slave_t | slave,
|  | uint8_t | data
| ) |  |

set the iic data out

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | slave | is the iic slave number
  [in] | data | is the set data

Returns
  status code
  - 0 success
  - 1 set iic data out failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 invalid slave

Note
  none

Definition at line 11268 of file driver_mpu9250.c.

## ◆ mpu9250_set_iic_delay()

uint8_t mpu9250_set_iic_delay | ( | mpu9250_handle_t * | handle,
|  | uint8_t | delay
| ) |  |

set the iic delay

Parameters

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

Returns
  status code
  - 0 success
  - 1 set iic delay failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 delay > 0x1F

Note
  none

Definition at line 12761 of file driver_mpu9250.c.

## ◆ mpu9250_set_iic_delay_enable()

uint8_t mpu9250_set_iic_delay_enable | ( | mpu9250_handle_t * | handle,
|  | mpu9250_iic_delay_t | delay,
|  | mpu9250_bool_t | enable
| ) |  |

enable or disable the iic delay

Parameters

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

Returns
  status code
  - 0 success
  - 1 set iic delay enable failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 12431 of file driver_mpu9250.c.

## ◆ mpu9250_set_iic_enable()

uint8_t mpu9250_set_iic_enable | ( | mpu9250_handle_t * | handle,
|  | mpu9250_iic_slave_t | slave,
|  | mpu9250_bool_t | enable
| ) |  |

enable or disable the iic

Parameters

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

Returns
  status code
  - 0 success
  - 1 set iic enable failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 invalid slave

Note
  none

Definition at line 11420 of file driver_mpu9250.c.

## ◆ mpu9250_set_iic_fifo_enable()

uint8_t mpu9250_set_iic_fifo_enable | ( | mpu9250_handle_t * | handle,
|  | mpu9250_iic_slave_t | slave,
|  | mpu9250_bool_t | enable
| ) |  |

enable or disable the iic fifo

Parameters

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

Returns
  status code
  - 0 success
  - 1 set iic fifo enable failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 invalid slave

Note
  none

Definition at line 10508 of file driver_mpu9250.c.

## ◆ mpu9250_set_iic_group_order()

uint8_t mpu9250_set_iic_group_order | ( | mpu9250_handle_t * | handle,
|  | mpu9250_iic_slave_t | slave,
|  | mpu9250_iic_group_order_t | order
| ) |  |

set the iic group order

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | slave | is the iic slave number
  [in] | order | is the group order

Returns
  status code
  - 0 success
  - 1 set iic group order failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 invalid slave

Note
  none

Definition at line 12002 of file driver_mpu9250.c.

## ◆ mpu9250_set_iic_master()

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

enable or disable the iic master mode

Parameters

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

Returns
  status code
  - 0 success
  - 1 set iic master failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 5879 of file driver_mpu9250.c.

## ◆ mpu9250_set_iic_mode()

uint8_t mpu9250_set_iic_mode | ( | mpu9250_handle_t * | handle,
|  | mpu9250_iic_slave_t | slave,
|  | mpu9250_iic_mode_t | mode
| ) |  |

set the iic mode

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | slave | is the iic slave number
  [in] | mode | is the iic mode

Returns
  status code
  - 0 success
  - 1 set iic mode failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 invalid slave

Note
  none

Definition at line 10648 of file driver_mpu9250.c.

## ◆ mpu9250_set_iic_multi_master()

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

enable or disable iic multi master

Parameters

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

Returns
  status code
  - 0 success
  - 1 set iic multi master failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 10260 of file driver_mpu9250.c.

## ◆ mpu9250_set_iic_read_mode()

uint8_t mpu9250_set_iic_read_mode | ( | mpu9250_handle_t * | handle,
|  | mpu9250_iic_read_mode_t | mode
| ) |  |

set the iic read mode

Parameters

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

Returns
  status code
  - 0 success
  - 1 set iic read mode failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 10424 of file driver_mpu9250.c.

## ◆ mpu9250_set_iic_register()

uint8_t mpu9250_set_iic_register | ( | mpu9250_handle_t * | handle,
|  | mpu9250_iic_slave_t | slave,
|  | uint8_t | reg
| ) |  |

set the iic register

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | slave | is the iic slave number
  [in] | reg | is the iic register

Returns
  status code
  - 0 success
  - 1 set iic register failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 invalid slave

Note
  none

Definition at line 11096 of file driver_mpu9250.c.

## ◆ mpu9250_set_iic_transaction_mode()

uint8_t mpu9250_set_iic_transaction_mode | ( | mpu9250_handle_t * | handle,
|  | mpu9250_iic_slave_t | slave,
|  | mpu9250_iic_transaction_mode_t | mode
| ) |  |

set the iic transaction mode

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | slave | is the iic slave number
  [in] | mode | is the iic transaction mode

Returns
  status code
  - 0 success
  - 1 set iic transaction mode failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 invalid slave

Note
  none

Definition at line 11808 of file driver_mpu9250.c.

## ◆ mpu9250_set_iic_transferred_len()

uint8_t mpu9250_set_iic_transferred_len | ( | mpu9250_handle_t * | handle,
|  | mpu9250_iic_slave_t | slave,
|  | uint8_t | len
| ) |  |

set the iic transferred length

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | slave | is the iic slave number
  [in] | len | is the iic transferred length

Returns
  status code
  - 0 success
  - 1 set iic transferred len failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 invalid slave
  - 5 len > 0xF

Note
  none

Definition at line 12197 of file driver_mpu9250.c.

## ◆ mpu9250_set_iic_wait_for_external_sensor()

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

enable or disable iic wait for external sensor

Parameters

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

Returns
  status code
  - 0 success
  - 1 set iic wait for external sensor failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 10342 of file driver_mpu9250.c.

## ◆ mpu9250_set_interface()

uint8_t mpu9250_set_interface | ( | mpu9250_handle_t * | handle,
|  | mpu9250_interface_t | interface
| ) |  |

set the chip interface

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | interface | is the chip interface

Returns
  status code
  - 0 success
  - 2 handle is NULL

Note
  none

Definition at line 3922 of file driver_mpu9250.c.

## ◆ mpu9250_set_interrupt()

uint8_t mpu9250_set_interrupt | ( | mpu9250_handle_t * | handle,
|  | mpu9250_interrupt_t | type,
|  | mpu9250_bool_t | enable
| ) |  |

enable or disable the interrupt

Parameters

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

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

Note
  none

Definition at line 8873 of file driver_mpu9250.c.

## ◆ mpu9250_set_interrupt_latch()

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

enable or disable the interrupt latch

Parameters

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

Returns
  status code
  - 0 success
  - 1 set interrupt latch failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 8462 of file driver_mpu9250.c.

## ◆ mpu9250_set_interrupt_level()

uint8_t mpu9250_set_interrupt_level | ( | mpu9250_handle_t * | handle,
|  | mpu9250_pin_level_t | level
| ) |  |

set the interrupt level

Parameters

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

Returns
  status code
  - 0 success
  - 1 set interrupt level failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 8298 of file driver_mpu9250.c.

## ◆ mpu9250_set_interrupt_pin_type()

uint8_t mpu9250_set_interrupt_pin_type | ( | mpu9250_handle_t * | handle,
|  | mpu9250_pin_type_t | type
| ) |  |

set the interrupt pin type

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | type | is the interrupt pin type

Returns
  status code
  - 0 success
  - 1 set interrupt pin type failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 8380 of file driver_mpu9250.c.

## ◆ mpu9250_set_interrupt_read_clear()

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

enable or disable the interrupt reading clear

Parameters

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

Returns
  status code
  - 0 success
  - 1 set interrupt read clear failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 8544 of file driver_mpu9250.c.

## ◆ mpu9250_set_low_pass_filter()

uint8_t mpu9250_set_low_pass_filter | ( | mpu9250_handle_t * | handle,
|  | mpu9250_low_pass_filter_t | filter
| ) |  |

set the low pass filter

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | filter | is the low pass filter

Returns
  status code
  - 0 success
  - 1 set low pass filter failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 7167 of file driver_mpu9250.c.

## ◆ mpu9250_set_low_power_accel_output_rate()

uint8_t mpu9250_set_low_power_accel_output_rate | ( | mpu9250_handle_t * | handle,
|  | mpu9250_low_power_accel_output_rate_t | rate
| ) |  |

set the low power accel output rate

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | rate | is the low power accel output rate

Returns
  status code
  - 0 success
  - 1 set low power accel output rate failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 7968 of file driver_mpu9250.c.

## ◆ mpu9250_set_motion_threshold()

uint8_t mpu9250_set_motion_threshold | ( | mpu9250_handle_t * | handle,
|  | uint8_t | threshold
| ) |  |

set the motion_threshold

Parameters

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

Returns
  status code
  - 0 success
  - 1 set motion threshold failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 9969 of file driver_mpu9250.c.

## ◆ mpu9250_set_ptat()

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

enable or disable the temperature sensor

Parameters

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

Returns
  status code
  - 0 success
  - 1 set temperature sensor failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 6449 of file driver_mpu9250.c.

## ◆ mpu9250_set_sample_rate_divider()

uint8_t mpu9250_set_sample_rate_divider | ( | mpu9250_handle_t * | handle,
|  | uint8_t | d
| ) |  |

set the sample rate divider

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | d | is the sample rate divider

Returns
  status code
  - 0 success
  - 1 set sample rate divider failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 7015 of file driver_mpu9250.c.

## ◆ mpu9250_set_signal_path_reset()

uint8_t mpu9250_set_signal_path_reset | ( | mpu9250_handle_t * | handle,
|  | mpu9250_signal_path_reset_t | path
| ) |  |

set the signal path reset

Parameters

  [in] | *handle | points to an mpu9250 handle structure
  [in] | path | is the signal path

Returns
  status code
  - 0 success
  - 1 set signal path reset failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 6970 of file driver_mpu9250.c.

## ◆ mpu9250_set_sleep()

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

enable or disable the sleep mode

Parameters

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

Returns
  status code
  - 0 success
  - 1 set sleep failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 6613 of file driver_mpu9250.c.

## ◆ mpu9250_set_standby_mode()

uint8_t mpu9250_set_standby_mode | ( | mpu9250_handle_t * | handle,
|  | mpu9250_source_t | source,
|  | mpu9250_bool_t | enable
| ) |  |

set source into standby mode

Parameters

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

Returns
  status code
  - 0 success
  - 1 set standby mode failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 6778 of file driver_mpu9250.c.

## ◆ mpu9250_set_wake_on_motion()

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

enable or disable wake on motion

Parameters

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

Returns
  status code
  - 0 success
  - 1 set wake on motion failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 8050 of file driver_mpu9250.c.