LibDriver MPU6050
Loading...
Searching...
No Matches
mpu6050 basic driver function

mpu6050 basic driver modules More...

Collaboration diagram for mpu6050 basic driver function:

Data Structures

struct  mpu6050_handle_s
 mpu6050 handle structure definition More...
struct  mpu6050_info_s
 mpu6050 information structure definition More...

Typedefs

typedef struct mpu6050_handle_s mpu6050_handle_t
 mpu6050 handle structure definition
typedef struct mpu6050_info_s mpu6050_info_t
 mpu6050 information structure definition

Enumerations

enum  mpu6050_address_t { MPU6050_ADDRESS_AD0_LOW = 0xD0 , MPU6050_ADDRESS_AD0_HIGH = 0xD2 }
 mpu6050 address enumeration definition More...
enum  mpu6050_wake_up_frequency_t { MPU6050_WAKE_UP_FREQUENCY_1P25_HZ = 0x00 , MPU6050_WAKE_UP_FREQUENCY_5_HZ = 0x01 , MPU6050_WAKE_UP_FREQUENCY_20_HZ = 0x02 , MPU6050_WAKE_UP_FREQUENCY_40_HZ = 0x03 }
 mpu6050 wake up frequency enumeration definition More...
enum  mpu6050_bool_t { MPU6050_BOOL_FALSE = 0x00 , MPU6050_BOOL_TRUE = 0x01 }
 mpu6050 bool enumeration definition More...
enum  mpu6050_source_t {
  MPU6050_SOURCE_ACC_X = 0x05 , MPU6050_SOURCE_ACC_Y = 0x04 , MPU6050_SOURCE_ACC_Z = 0x03 , MPU6050_SOURCE_GYRO_X = 0x02 ,
  MPU6050_SOURCE_GYRO_Y = 0x01 , MPU6050_SOURCE_GYRO_Z = 0x00
}
 mpu6050 source enumeration definition More...
enum  mpu6050_clock_source_t {
  MPU6050_CLOCK_SOURCE_INTERNAL_8MHZ = 0x00 , MPU6050_CLOCK_SOURCE_PLL_X_GYRO = 0x01 , MPU6050_CLOCK_SOURCE_PLL_Y_GYRO = 0x02 , MPU6050_CLOCK_SOURCE_PLL_Z_GYRO = 0x03 ,
  MPU6050_CLOCK_SOURCE_PLL_EXT_32P768_KHZ = 0x04 , MPU6050_CLOCK_SOURCE_PLL_EXT_19P2_MHZ = 0x05 , MPU6050_CLOCK_SOURCE_STOP_CLOCK = 0x07
}
 mpu6050 clock source enumeration definition More...
enum  mpu6050_signal_path_reset_t { MPU6050_SIGNAL_PATH_RESET_TEMP = 0x00 , MPU6050_SIGNAL_PATH_RESET_ACCEL = 0x01 , MPU6050_SIGNAL_PATH_RESET_GYRO = 0x02 }
 mpu6050 signal path reset enumeration definition More...
enum  mpu6050_extern_sync_t {
  MPU6050_EXTERN_SYNC_INPUT_DISABLED = 0x00 , MPU6050_EXTERN_SYNC_TEMP_OUT_L = 0x01 , MPU6050_EXTERN_SYNC_GYRO_XOUT_L = 0x02 , MPU6050_EXTERN_SYNC_GYRO_YOUT_L = 0x03 ,
  MPU6050_EXTERN_SYNC_GYRO_ZOUT_L = 0x04 , MPU6050_EXTERN_SYNC_ACCEL_XOUT_L = 0x05 , MPU6050_EXTERN_SYNC_ACCEL_YOUT_L = 0x06 , MPU6050_EXTERN_SYNC_ACCEL_ZOUT_L = 0x07
}
 mpu6050 extern sync enumeration definition More...
enum  mpu6050_low_pass_filter_t {
  MPU6050_LOW_PASS_FILTER_0 = 0x00 , MPU6050_LOW_PASS_FILTER_1 = 0x01 , MPU6050_LOW_PASS_FILTER_2 = 0x02 , MPU6050_LOW_PASS_FILTER_3 = 0x03 ,
  MPU6050_LOW_PASS_FILTER_4 = 0x04 , MPU6050_LOW_PASS_FILTER_5 = 0x05 , MPU6050_LOW_PASS_FILTER_6 = 0x06
}
 mpu6050 low pass filter enumeration definition More...
enum  mpu6050_axis_t { MPU6050_AXIS_Z = 0x05 , MPU6050_AXIS_Y = 0x06 , MPU6050_AXIS_X = 0x07 }
 mpu6050 axis enumeration definition More...
enum  mpu6050_gyroscope_range_t { MPU6050_GYROSCOPE_RANGE_250DPS = 0x00 , MPU6050_GYROSCOPE_RANGE_500DPS = 0x01 , MPU6050_GYROSCOPE_RANGE_1000DPS = 0x02 , MPU6050_GYROSCOPE_RANGE_2000DPS = 0x03 }
 mpu6050 gyroscope range enumeration definition More...
enum  mpu6050_accelerometer_range_t { MPU6050_ACCELEROMETER_RANGE_2G = 0x00 , MPU6050_ACCELEROMETER_RANGE_4G = 0x01 , MPU6050_ACCELEROMETER_RANGE_8G = 0x02 , MPU6050_ACCELEROMETER_RANGE_16G = 0x03 }
 mpu6050 accelerometer range enumeration definition More...
enum  mpu6050_fifo_t {
  MPU6050_FIFO_TEMP = 0x07 , MPU6050_FIFO_XG = 0x06 , MPU6050_FIFO_YG = 0x05 , MPU6050_FIFO_ZG = 0x04 ,
  MPU6050_FIFO_ACCEL = 0x03
}
 mpu6050 fifo enumeration definition More...
enum  mpu6050_pin_level_t { MPU6050_PIN_LEVEL_HIGH = 0x00 , MPU6050_PIN_LEVEL_LOW = 0x01 }
 mpu6050 pin level enumeration definition More...
enum  mpu6050_pin_type_t { MPU6050_PIN_TYPE_PUSH_PULL = 0x00 , MPU6050_PIN_TYPE_OPEN_DRAIN = 0x01 }
 mpu6050 pin type enumeration definition More...
enum  mpu6050_interrupt_t {
  MPU6050_INTERRUPT_MOTION = 6 , MPU6050_INTERRUPT_FIFO_OVERFLOW = 4 , MPU6050_INTERRUPT_I2C_MAST = 3 , MPU6050_INTERRUPT_DMP = 1 ,
  MPU6050_INTERRUPT_DATA_READY = 0
}
 mpu6050 interrupt enumeration definition More...
enum  mpu6050_iic_slave_t {
  MPU6050_IIC_SLAVE_0 = 0x00 , MPU6050_IIC_SLAVE_1 = 0x01 , MPU6050_IIC_SLAVE_2 = 0x02 , MPU6050_IIC_SLAVE_3 = 0x03 ,
  MPU6050_IIC_SLAVE_4 = 0x04
}
 mpu6050 iic slave enumeration definition More...
enum  mpu6050_iic_clock_t {
  MPU6050_IIC_CLOCK_348_KHZ = 0x00 , MPU6050_IIC_CLOCK_333_KHZ = 0x01 , MPU6050_IIC_CLOCK_320_KHZ = 0x02 , MPU6050_IIC_CLOCK_308_KHZ = 0x03 ,
  MPU6050_IIC_CLOCK_296_KHZ = 0x04 , MPU6050_IIC_CLOCK_286_KHZ = 0x05 , MPU6050_IIC_CLOCK_276_KHZ = 0x06 , MPU6050_IIC_CLOCK_267_KHZ = 0x07 ,
  MPU6050_IIC_CLOCK_258_KHZ = 0x08 , MPU6050_IIC_CLOCK_500_KHZ = 0x09 , MPU6050_IIC_CLOCK_471_KHZ = 0x0A , MPU6050_IIC_CLOCK_444_KHZ = 0x0B ,
  MPU6050_IIC_CLOCK_421_KHZ = 0x0C , MPU6050_IIC_CLOCK_400_KHZ = 0x0D , MPU6050_IIC_CLOCK_381_KHZ = 0x0E , MPU6050_IIC_CLOCK_364_KHZ = 0x0F
}
 mpu6050 iic clock enumeration definition More...
enum  mpu6050_iic_read_mode_t { MPU6050_IIC_READ_MODE_RESTART = 0x00 , MPU6050_IIC_READ_MODE_STOP_AND_START = 0x01 }
 mpu6050 iic read mode enumeration definition More...
enum  mpu6050_iic_mode_t { MPU6050_IIC_MODE_WRITE = 0x00 , MPU6050_IIC_MODE_READ = 0x01 }
 mpu6050 iic mode enumeration definition More...
enum  mpu6050_iic_transaction_mode_t { MPU6050_IIC_TRANSACTION_MODE_DATA = 0x00 , MPU6050_IIC_TRANSACTION_MODE_REG_DATA = 0x01 }
 mpu6050 iic transaction mode enumeration definition More...
enum  mpu6050_iic4_transaction_mode_t { MPU6050_IIC4_TRANSACTION_MODE_DATA = 0x00 , MPU6050_IIC4_TRANSACTION_MODE_REG = 0x01 }
 mpu6050 iic4 transaction mode enumeration definition More...
enum  mpu6050_iic_group_order_t { MPU6050_IIC_GROUP_ORDER_EVEN = 0x00 , MPU6050_IIC_GROUP_ORDER_ODD = 0x01 }
 mpu6050 iic group order enumeration definition More...
enum  mpu6050_iic_status_t {
  MPU6050_IIC_STATUS_PASS_THROUGH = 0x80 , MPU6050_IIC_STATUS_IIC_SLV4_DONE = 0x40 , MPU6050_IIC_STATUS_IIC_LOST_ARB = 0x20 , MPU6050_IIC_STATUS_IIC_SLV4_NACK = 0x10 ,
  MPU6050_IIC_STATUS_IIC_SLV3_NACK = 0x08 , MPU6050_IIC_STATUS_IIC_SLV2_NACK = 0x04 , MPU6050_IIC_STATUS_IIC_SLV1_NACK = 0x02 , MPU6050_IIC_STATUS_IIC_SLV0_NACK = 0x01
}
 mpu6050 iic status enumeration definition More...
enum  mpu6050_iic_delay_t {
  MPU6050_IIC_DELAY_ES_SHADOW = 7 , MPU6050_IIC_DELAY_SLAVE_4 = 4 , MPU6050_IIC_DELAY_SLAVE_3 = 3 , MPU6050_IIC_DELAY_SLAVE_2 = 2 ,
  MPU6050_IIC_DELAY_SLAVE_1 = 1 , MPU6050_IIC_DELAY_SLAVE_0 = 0
}
 mpu6050 iic delay enumeration definition More...

Functions

uint8_t mpu6050_info (mpu6050_info_t *info)
 get the chip's information
uint8_t mpu6050_set_addr_pin (mpu6050_handle_t *handle, mpu6050_address_t addr_pin)
 set the chip address pin
uint8_t mpu6050_get_addr_pin (mpu6050_handle_t *handle, mpu6050_address_t *addr_pin)
 get the chip address pin
uint8_t mpu6050_irq_handler (mpu6050_handle_t *handle)
 irq handler
uint8_t mpu6050_init (mpu6050_handle_t *handle)
 initialize the chip
uint8_t mpu6050_deinit (mpu6050_handle_t *handle)
 close the chip
uint8_t mpu6050_read (mpu6050_handle_t *handle, int16_t(*accel_raw)[3], float(*accel_g)[3], int16_t(*gyro_raw)[3], float(*gyro_dps)[3], uint16_t *len)
 read the data
uint8_t mpu6050_read_temperature (mpu6050_handle_t *handle, int16_t(*raw), float *degrees)
 read the temperature
uint8_t mpu6050_set_fifo (mpu6050_handle_t *handle, mpu6050_bool_t enable)
 enable or disable fifo
uint8_t mpu6050_get_fifo (mpu6050_handle_t *handle, mpu6050_bool_t *enable)
 get the fifo status
uint8_t mpu6050_force_fifo_reset (mpu6050_handle_t *handle)
 force reset the fifo
uint8_t mpu6050_set_iic_master (mpu6050_handle_t *handle, mpu6050_bool_t enable)
 enable or disable the iic master mode
uint8_t mpu6050_get_iic_master (mpu6050_handle_t *handle, mpu6050_bool_t *enable)
 get the iic master status
uint8_t mpu6050_fifo_reset (mpu6050_handle_t *handle)
 reset the fifo
uint8_t mpu6050_get_fifo_reset (mpu6050_handle_t *handle, mpu6050_bool_t *enable)
 get the fifo reset status
uint8_t mpu6050_iic_master_reset (mpu6050_handle_t *handle)
 reset the iic master controller
uint8_t mpu6050_get_iic_master_reset (mpu6050_handle_t *handle, mpu6050_bool_t *enable)
 get the iic master reset status
uint8_t mpu6050_sensor_reset (mpu6050_handle_t *handle)
 reset all sensors
uint8_t mpu6050_get_sensor_reset (mpu6050_handle_t *handle, mpu6050_bool_t *enable)
 get the sensor reset status
uint8_t mpu6050_device_reset (mpu6050_handle_t *handle)
 reset the chip
uint8_t mpu6050_get_device_reset (mpu6050_handle_t *handle, mpu6050_bool_t *enable)
 get the device reset status
uint8_t mpu6050_set_clock_source (mpu6050_handle_t *handle, mpu6050_clock_source_t clock_source)
 set the chip clock source
uint8_t mpu6050_get_clock_source (mpu6050_handle_t *handle, mpu6050_clock_source_t *clock_source)
 get the chip clock source
uint8_t mpu6050_set_temperature_sensor (mpu6050_handle_t *handle, mpu6050_bool_t enable)
 enable or disable the temperature sensor
uint8_t mpu6050_get_temperature_sensor (mpu6050_handle_t *handle, mpu6050_bool_t *enable)
 get the temperature sensor status
uint8_t mpu6050_set_cycle_wake_up (mpu6050_handle_t *handle, mpu6050_bool_t enable)
 enable or disable the cycle wake up mode
uint8_t mpu6050_get_cycle_wake_up (mpu6050_handle_t *handle, mpu6050_bool_t *enable)
 get the cycle wake up mode status
uint8_t mpu6050_set_sleep (mpu6050_handle_t *handle, mpu6050_bool_t enable)
 enable or disable the sleep mode
uint8_t mpu6050_get_sleep (mpu6050_handle_t *handle, mpu6050_bool_t *enable)
 get the sleep status
uint8_t mpu6050_set_standby_mode (mpu6050_handle_t *handle, mpu6050_source_t source, mpu6050_bool_t enable)
 set source into standby mode
uint8_t mpu6050_get_standby_mode (mpu6050_handle_t *handle, mpu6050_source_t source, mpu6050_bool_t *enable)
 get the source mode
uint8_t mpu6050_set_wake_up_frequency (mpu6050_handle_t *handle, mpu6050_wake_up_frequency_t frequency)
 set the wake up frequency
uint8_t mpu6050_get_wake_up_frequency (mpu6050_handle_t *handle, mpu6050_wake_up_frequency_t *frequency)
 get the wake up frequency
uint8_t mpu6050_get_fifo_count (mpu6050_handle_t *handle, uint16_t *count)
 get the fifo counter value
uint8_t mpu6050_fifo_get (mpu6050_handle_t *handle, uint8_t *buf, uint16_t len)
 fifo read bytes
uint8_t mpu6050_fifo_set (mpu6050_handle_t *handle, uint8_t *buf, uint16_t len)
 fifo write bytes
uint8_t mpu6050_set_signal_path_reset (mpu6050_handle_t *handle, mpu6050_signal_path_reset_t path)
 set the signal path reset
uint8_t mpu6050_set_sample_rate_divider (mpu6050_handle_t *handle, uint8_t d)
 set the sample rate divider
uint8_t mpu6050_get_sample_rate_divider (mpu6050_handle_t *handle, uint8_t *d)
 get the sample rate divider
uint8_t mpu6050_set_extern_sync (mpu6050_handle_t *handle, mpu6050_extern_sync_t sync)
 set the extern sync type
uint8_t mpu6050_get_extern_sync (mpu6050_handle_t *handle, mpu6050_extern_sync_t *sync)
 get the extern sync type
uint8_t mpu6050_set_low_pass_filter (mpu6050_handle_t *handle, mpu6050_low_pass_filter_t filter)
 set the low pass filter
uint8_t mpu6050_get_low_pass_filter (mpu6050_handle_t *handle, mpu6050_low_pass_filter_t *filter)
 get the low pass filter
uint8_t mpu6050_set_gyroscope_test (mpu6050_handle_t *handle, mpu6050_axis_t axis, mpu6050_bool_t enable)
 set the gyroscope test
uint8_t mpu6050_get_gyroscope_test (mpu6050_handle_t *handle, mpu6050_axis_t axis, mpu6050_bool_t *enable)
 get the gyroscope test
uint8_t mpu6050_set_gyroscope_range (mpu6050_handle_t *handle, mpu6050_gyroscope_range_t range)
 set the gyroscope range
uint8_t mpu6050_get_gyroscope_range (mpu6050_handle_t *handle, mpu6050_gyroscope_range_t *range)
 get the gyroscope range
uint8_t mpu6050_set_accelerometer_test (mpu6050_handle_t *handle, mpu6050_axis_t axis, mpu6050_bool_t enable)
 set the accelerometer test
uint8_t mpu6050_get_accelerometer_test (mpu6050_handle_t *handle, mpu6050_axis_t axis, mpu6050_bool_t *enable)
 get the accelerometer test
uint8_t mpu6050_set_accelerometer_range (mpu6050_handle_t *handle, mpu6050_accelerometer_range_t range)
 set the accelerometer range
uint8_t mpu6050_get_accelerometer_range (mpu6050_handle_t *handle, mpu6050_accelerometer_range_t *range)
 get the accelerometer range
uint8_t mpu6050_set_fifo_enable (mpu6050_handle_t *handle, mpu6050_fifo_t fifo, mpu6050_bool_t enable)
 enable or disable the fifo function
uint8_t mpu6050_get_fifo_enable (mpu6050_handle_t *handle, mpu6050_fifo_t fifo, mpu6050_bool_t *enable)
 get the fifo function status
uint8_t mpu6050_set_interrupt_level (mpu6050_handle_t *handle, mpu6050_pin_level_t level)
 set the interrupt level
uint8_t mpu6050_get_interrupt_level (mpu6050_handle_t *handle, mpu6050_pin_level_t *level)
 get the interrupt level
uint8_t mpu6050_set_interrupt_pin_type (mpu6050_handle_t *handle, mpu6050_pin_type_t type)
 set the interrupt pin type
uint8_t mpu6050_get_interrupt_pin_type (mpu6050_handle_t *handle, mpu6050_pin_type_t *type)
 get the interrupt pin type
uint8_t mpu6050_set_interrupt_latch (mpu6050_handle_t *handle, mpu6050_bool_t enable)
 enable or disable the interrupt latch
uint8_t mpu6050_get_interrupt_latch (mpu6050_handle_t *handle, mpu6050_bool_t *enable)
 get the interrupt latch status
uint8_t mpu6050_set_interrupt_read_clear (mpu6050_handle_t *handle, mpu6050_bool_t enable)
 enable or disable the interrupt reading clear
uint8_t mpu6050_get_interrupt_read_clear (mpu6050_handle_t *handle, mpu6050_bool_t *enable)
 get the interrupt reading clear status
uint8_t mpu6050_set_fsync_interrupt_level (mpu6050_handle_t *handle, mpu6050_pin_level_t level)
 set the fsync interrupt level
uint8_t mpu6050_get_fsync_interrupt_level (mpu6050_handle_t *handle, mpu6050_pin_level_t *level)
 get the fsync interrupt level
uint8_t mpu6050_set_fsync_interrupt (mpu6050_handle_t *handle, mpu6050_bool_t enable)
 enable or disable the fsync interrupt
uint8_t mpu6050_get_fsync_interrupt (mpu6050_handle_t *handle, mpu6050_bool_t *enable)
 get the fsync interrupt status
uint8_t mpu6050_set_iic_bypass (mpu6050_handle_t *handle, mpu6050_bool_t enable)
 enable or disable the iic bypass
uint8_t mpu6050_get_iic_bypass (mpu6050_handle_t *handle, mpu6050_bool_t *enable)
 get the iic bypass status
uint8_t mpu6050_set_interrupt (mpu6050_handle_t *handle, mpu6050_interrupt_t type, mpu6050_bool_t enable)
 enable or disable the interrupt
uint8_t mpu6050_get_interrupt (mpu6050_handle_t *handle, mpu6050_interrupt_t type, mpu6050_bool_t *enable)
 get the interrupt status
uint8_t mpu6050_get_interrupt_status (mpu6050_handle_t *handle, uint8_t *status)
 get the interrupt status
uint8_t mpu6050_set_gyroscope_x_test (mpu6050_handle_t *handle, uint8_t data)
 set the gyroscope x test
uint8_t mpu6050_get_gyroscope_x_test (mpu6050_handle_t *handle, uint8_t *data)
 get the gyroscope x test
uint8_t mpu6050_set_gyroscope_y_test (mpu6050_handle_t *handle, uint8_t data)
 set the gyroscope y test
uint8_t mpu6050_get_gyroscope_y_test (mpu6050_handle_t *handle, uint8_t *data)
 get the gyroscope y test
uint8_t mpu6050_set_gyroscope_z_test (mpu6050_handle_t *handle, uint8_t data)
 set the gyroscope z test
uint8_t mpu6050_get_gyroscope_z_test (mpu6050_handle_t *handle, uint8_t *data)
 get the gyroscope z test
uint8_t mpu6050_set_accelerometer_x_test (mpu6050_handle_t *handle, uint8_t data)
 set the accelerometer x test
uint8_t mpu6050_get_accelerometer_x_test (mpu6050_handle_t *handle, uint8_t *data)
 get the accelerometer x test
uint8_t mpu6050_set_accelerometer_y_test (mpu6050_handle_t *handle, uint8_t data)
 set the accelerometer y test
uint8_t mpu6050_get_accelerometer_y_test (mpu6050_handle_t *handle, uint8_t *data)
 get the accelerometer y test
uint8_t mpu6050_set_accelerometer_z_test (mpu6050_handle_t *handle, uint8_t data)
 set the accelerometer z test
uint8_t mpu6050_get_accelerometer_z_test (mpu6050_handle_t *handle, uint8_t *data)
 get the accelerometer z test
uint8_t mpu6050_set_motion_threshold (mpu6050_handle_t *handle, uint8_t threshold)
 set the motion_threshold
uint8_t mpu6050_get_motion_threshold (mpu6050_handle_t *handle, uint8_t *threshold)
 get the motion_threshold
uint8_t mpu6050_motion_threshold_convert_to_register (mpu6050_handle_t *handle, float mg, uint8_t *reg)
 convert the motion threshold to the register raw data
uint8_t mpu6050_motion_threshold_convert_to_data (mpu6050_handle_t *handle, uint8_t reg, float *mg)
 convert the register raw data to the motion threshold
uint8_t mpu6050_set_motion_duration (mpu6050_handle_t *handle, uint8_t duration)
 set the motion duration
uint8_t mpu6050_get_motion_duration (mpu6050_handle_t *handle, uint8_t *duration)
 get the motion duration
uint8_t mpu6050_motion_duration_convert_to_register (mpu6050_handle_t *handle, uint8_t ms, uint8_t *reg)
 convert the motion duration to the register raw data
uint8_t mpu6050_motion_duration_convert_to_data (mpu6050_handle_t *handle, uint8_t reg, uint8_t *ms)
 convert the register raw data to the motion duration
uint8_t mpu6050_set_force_accel_sample (mpu6050_handle_t *handle, mpu6050_bool_t enable)
 enable or disable force accel sample
uint8_t mpu6050_self_test (mpu6050_handle_t *handle, int32_t gyro_offset_raw[3], int32_t accel_offset_raw[3])
 run the self test
uint8_t mpu6050_set_iic_clock (mpu6050_handle_t *handle, mpu6050_iic_clock_t clk)
 set the iic clock
uint8_t mpu6050_get_iic_clock (mpu6050_handle_t *handle, mpu6050_iic_clock_t *clk)
 get the iic clock
uint8_t mpu6050_set_iic_multi_master (mpu6050_handle_t *handle, mpu6050_bool_t enable)
 enable or disable iic multi master
uint8_t mpu6050_get_iic_multi_master (mpu6050_handle_t *handle, mpu6050_bool_t *enable)
 get the iic multi master status
uint8_t mpu6050_set_iic_wait_for_external_sensor (mpu6050_handle_t *handle, mpu6050_bool_t enable)
 enable or disable iic wait for external sensor
uint8_t mpu6050_get_iic_wait_for_external_sensor (mpu6050_handle_t *handle, mpu6050_bool_t *enable)
 get the iic wait for external sensor status
uint8_t mpu6050_set_iic_read_mode (mpu6050_handle_t *handle, mpu6050_iic_read_mode_t mode)
 set the iic read mode
uint8_t mpu6050_get_iic_read_mode (mpu6050_handle_t *handle, mpu6050_iic_read_mode_t *mode)
 get the iic read mode
uint8_t mpu6050_set_iic_fifo_enable (mpu6050_handle_t *handle, mpu6050_iic_slave_t slave, mpu6050_bool_t enable)
 enable or disable the iic fifo
uint8_t mpu6050_get_iic_fifo_enable (mpu6050_handle_t *handle, mpu6050_iic_slave_t slave, mpu6050_bool_t *enable)
 get the iic fifo status
uint8_t mpu6050_set_iic_mode (mpu6050_handle_t *handle, mpu6050_iic_slave_t slave, mpu6050_iic_mode_t mode)
 set the iic mode
uint8_t mpu6050_get_iic_mode (mpu6050_handle_t *handle, mpu6050_iic_slave_t slave, mpu6050_iic_mode_t *mode)
 get the iic mode
uint8_t mpu6050_set_iic_address (mpu6050_handle_t *handle, mpu6050_iic_slave_t slave, uint8_t addr_7bit)
 set the iic address
uint8_t mpu6050_get_iic_address (mpu6050_handle_t *handle, mpu6050_iic_slave_t slave, uint8_t *addr_7bit)
 get the iic address
uint8_t mpu6050_set_iic_register (mpu6050_handle_t *handle, mpu6050_iic_slave_t slave, uint8_t reg)
 set the iic register
uint8_t mpu6050_get_iic_register (mpu6050_handle_t *handle, mpu6050_iic_slave_t slave, uint8_t *reg)
 get the iic register
uint8_t mpu6050_set_iic_data_out (mpu6050_handle_t *handle, mpu6050_iic_slave_t slave, uint8_t data)
 set the iic data out
uint8_t mpu6050_get_iic_data_out (mpu6050_handle_t *handle, mpu6050_iic_slave_t slave, uint8_t *data)
 get the iic data out
uint8_t mpu6050_set_iic_enable (mpu6050_handle_t *handle, mpu6050_iic_slave_t slave, mpu6050_bool_t enable)
 enable or disable the iic
uint8_t mpu6050_get_iic_enable (mpu6050_handle_t *handle, mpu6050_iic_slave_t slave, mpu6050_bool_t *enable)
 get the iic status
uint8_t mpu6050_set_iic_byte_swap (mpu6050_handle_t *handle, mpu6050_iic_slave_t slave, mpu6050_bool_t enable)
 enable or disable the iic byte swap
uint8_t mpu6050_get_iic_byte_swap (mpu6050_handle_t *handle, mpu6050_iic_slave_t slave, mpu6050_bool_t *enable)
 get the iic byte swap status
uint8_t mpu6050_set_iic_transaction_mode (mpu6050_handle_t *handle, mpu6050_iic_slave_t slave, mpu6050_iic_transaction_mode_t mode)
 set the iic transaction mode
uint8_t mpu6050_get_iic_transaction_mode (mpu6050_handle_t *handle, mpu6050_iic_slave_t slave, mpu6050_iic_transaction_mode_t *mode)
 get the iic transaction mode
uint8_t mpu6050_set_iic_group_order (mpu6050_handle_t *handle, mpu6050_iic_slave_t slave, mpu6050_iic_group_order_t order)
 set the iic group order
uint8_t mpu6050_get_iic_group_order (mpu6050_handle_t *handle, mpu6050_iic_slave_t slave, mpu6050_iic_group_order_t *order)
 get the iic group order
uint8_t mpu6050_set_iic_transferred_len (mpu6050_handle_t *handle, mpu6050_iic_slave_t slave, uint8_t len)
 set the iic transferred length
uint8_t mpu6050_get_iic_transferred_len (mpu6050_handle_t *handle, mpu6050_iic_slave_t slave, uint8_t *len)
 get the iic transferred length
uint8_t mpu6050_get_iic_status (mpu6050_handle_t *handle, uint8_t *status)
 get the iic status
uint8_t mpu6050_set_iic_delay_enable (mpu6050_handle_t *handle, mpu6050_iic_delay_t delay, mpu6050_bool_t enable)
 enable or disable the iic delay
uint8_t mpu6050_get_iic_delay_enable (mpu6050_handle_t *handle, mpu6050_iic_delay_t delay, mpu6050_bool_t *enable)
 get the iic delay status
uint8_t mpu6050_set_iic4_enable (mpu6050_handle_t *handle, mpu6050_bool_t enable)
 enable or disable the iic4
uint8_t mpu6050_get_iic4_enable (mpu6050_handle_t *handle, mpu6050_bool_t *enable)
 get the iic4 status
uint8_t mpu6050_set_iic4_interrupt (mpu6050_handle_t *handle, mpu6050_bool_t enable)
 enable or disable the iic4 interrupt
uint8_t mpu6050_get_iic4_interrupt (mpu6050_handle_t *handle, mpu6050_bool_t *enable)
 get the iic4 interrupt status
uint8_t mpu6050_set_iic4_transaction_mode (mpu6050_handle_t *handle, mpu6050_iic4_transaction_mode_t mode)
 set the iic4 transaction mode
uint8_t mpu6050_get_iic4_transaction_mode (mpu6050_handle_t *handle, mpu6050_iic4_transaction_mode_t *mode)
 get the iic4 transaction mode
uint8_t mpu6050_set_iic_delay (mpu6050_handle_t *handle, uint8_t delay)
 set the iic delay
uint8_t mpu6050_get_iic_delay (mpu6050_handle_t *handle, uint8_t *delay)
 get the iic delay
uint8_t mpu6050_set_iic4_data_out (mpu6050_handle_t *handle, uint8_t data)
 set the iic4 data out
uint8_t mpu6050_get_iic4_data_out (mpu6050_handle_t *handle, uint8_t *data)
 get the iic4 data out
uint8_t mpu6050_set_iic4_data_in (mpu6050_handle_t *handle, uint8_t data)
 set the iic4 data in
uint8_t mpu6050_get_iic4_data_in (mpu6050_handle_t *handle, uint8_t *data)
 get the iic4 data in
uint8_t mpu6050_read_extern_sensor_data (mpu6050_handle_t *handle, uint8_t *data, uint8_t len)
 read the extern sensor data

Detailed Description

mpu6050 basic driver modules

Typedef Documentation

◆ mpu6050_handle_t

mpu6050 handle structure definition

◆ mpu6050_info_t

mpu6050 information structure definition

Enumeration Type Documentation

◆ mpu6050_accelerometer_range_t

mpu6050 accelerometer range enumeration definition

Enumerator
MPU6050_ACCELEROMETER_RANGE_2G 

±2 g

MPU6050_ACCELEROMETER_RANGE_4G 

±4 g

MPU6050_ACCELEROMETER_RANGE_8G 

±8 g

MPU6050_ACCELEROMETER_RANGE_16G 

±16 g

Definition at line 178 of file driver_mpu6050.h.

◆ mpu6050_address_t

mpu6050 address enumeration definition

Enumerator
MPU6050_ADDRESS_AD0_LOW 

AD0 pin set LOW

MPU6050_ADDRESS_AD0_HIGH 

AD0 pin set HIGH

Definition at line 62 of file driver_mpu6050.h.

◆ mpu6050_axis_t

mpu6050 axis enumeration definition

Enumerator
MPU6050_AXIS_Z 

z

MPU6050_AXIS_Y 

y

MPU6050_AXIS_X 

x

Definition at line 157 of file driver_mpu6050.h.

◆ mpu6050_bool_t

mpu6050 bool enumeration definition

Enumerator
MPU6050_BOOL_FALSE 

disable function

MPU6050_BOOL_TRUE 

enable function

Definition at line 82 of file driver_mpu6050.h.

◆ mpu6050_clock_source_t

mpu6050 clock source enumeration definition

Enumerator
MPU6050_CLOCK_SOURCE_INTERNAL_8MHZ 

internal 8MHz

MPU6050_CLOCK_SOURCE_PLL_X_GYRO 

pll with x axis gyroscope reference

MPU6050_CLOCK_SOURCE_PLL_Y_GYRO 

pll with y axis gyroscope reference

MPU6050_CLOCK_SOURCE_PLL_Z_GYRO 

pll with z axis gyroscope reference

MPU6050_CLOCK_SOURCE_PLL_EXT_32P768_KHZ 

pll extern 32.768 KHz

MPU6050_CLOCK_SOURCE_PLL_EXT_19P2_MHZ 

pll extern 19.2 MHz

MPU6050_CLOCK_SOURCE_STOP_CLOCK 

stop the clock

Definition at line 104 of file driver_mpu6050.h.

◆ mpu6050_extern_sync_t

mpu6050 extern sync enumeration definition

Enumerator
MPU6050_EXTERN_SYNC_INPUT_DISABLED 

input disabled

MPU6050_EXTERN_SYNC_TEMP_OUT_L 

temp out low

MPU6050_EXTERN_SYNC_GYRO_XOUT_L 

gyro xout low

MPU6050_EXTERN_SYNC_GYRO_YOUT_L 

gyro yout low

MPU6050_EXTERN_SYNC_GYRO_ZOUT_L 

gyro zout low

MPU6050_EXTERN_SYNC_ACCEL_XOUT_L 

accel xout low

MPU6050_EXTERN_SYNC_ACCEL_YOUT_L 

accel yout low

MPU6050_EXTERN_SYNC_ACCEL_ZOUT_L 

accel zout low

Definition at line 128 of file driver_mpu6050.h.

◆ mpu6050_fifo_t

mpu6050 fifo enumeration definition

Enumerator
MPU6050_FIFO_TEMP 

temperature

MPU6050_FIFO_XG 

gyroscope x

MPU6050_FIFO_YG 

gyroscope y

MPU6050_FIFO_ZG 

gyroscope z

MPU6050_FIFO_ACCEL 

accelerometer

Definition at line 189 of file driver_mpu6050.h.

◆ mpu6050_gyroscope_range_t

mpu6050 gyroscope range enumeration definition

Enumerator
MPU6050_GYROSCOPE_RANGE_250DPS 

±250 dps

MPU6050_GYROSCOPE_RANGE_500DPS 

±500 dps

MPU6050_GYROSCOPE_RANGE_1000DPS 

±1000 dps

MPU6050_GYROSCOPE_RANGE_2000DPS 

±2000 dps

Definition at line 167 of file driver_mpu6050.h.

◆ mpu6050_iic4_transaction_mode_t

mpu6050 iic4 transaction mode enumeration definition

Enumerator
MPU6050_IIC4_TRANSACTION_MODE_DATA 

data only

MPU6050_IIC4_TRANSACTION_MODE_REG 

register only

Definition at line 293 of file driver_mpu6050.h.

◆ mpu6050_iic_clock_t

mpu6050 iic clock enumeration definition

Enumerator
MPU6050_IIC_CLOCK_348_KHZ 

348 kHz

MPU6050_IIC_CLOCK_333_KHZ 

333 kHz

MPU6050_IIC_CLOCK_320_KHZ 

320 kHz

MPU6050_IIC_CLOCK_308_KHZ 

308 kHz

MPU6050_IIC_CLOCK_296_KHZ 

296 kHz

MPU6050_IIC_CLOCK_286_KHZ 

286 kHz

MPU6050_IIC_CLOCK_276_KHZ 

276 kHz

MPU6050_IIC_CLOCK_267_KHZ 

267 kHz

MPU6050_IIC_CLOCK_258_KHZ 

258 kHz

MPU6050_IIC_CLOCK_500_KHZ 

500 kHz

MPU6050_IIC_CLOCK_471_KHZ 

471 kHz

MPU6050_IIC_CLOCK_444_KHZ 

444 kHz

MPU6050_IIC_CLOCK_421_KHZ 

421 kHz

MPU6050_IIC_CLOCK_400_KHZ 

400 kHz

MPU6050_IIC_CLOCK_381_KHZ 

381 kHz

MPU6050_IIC_CLOCK_364_KHZ 

364 kHz

Definition at line 243 of file driver_mpu6050.h.

◆ mpu6050_iic_delay_t

mpu6050 iic delay enumeration definition

Enumerator
MPU6050_IIC_DELAY_ES_SHADOW 

delays shadowing of external sensor data until all data has been received

MPU6050_IIC_DELAY_SLAVE_4 

slave 4

MPU6050_IIC_DELAY_SLAVE_3 

slave 3

MPU6050_IIC_DELAY_SLAVE_2 

slave 2

MPU6050_IIC_DELAY_SLAVE_1 

slave 1

MPU6050_IIC_DELAY_SLAVE_0 

slave 0

Definition at line 328 of file driver_mpu6050.h.

◆ mpu6050_iic_group_order_t

mpu6050 iic group order enumeration definition

Enumerator
MPU6050_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.

MPU6050_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 302 of file driver_mpu6050.h.

◆ mpu6050_iic_mode_t

mpu6050 iic mode enumeration definition

Enumerator
MPU6050_IIC_MODE_WRITE 

write

MPU6050_IIC_MODE_READ 

read

Definition at line 275 of file driver_mpu6050.h.

◆ mpu6050_iic_read_mode_t

mpu6050 iic read mode enumeration definition

Enumerator
MPU6050_IIC_READ_MODE_RESTART 

restart

MPU6050_IIC_READ_MODE_STOP_AND_START 

stop and start

Definition at line 266 of file driver_mpu6050.h.

◆ mpu6050_iic_slave_t

mpu6050 iic slave enumeration definition

Enumerator
MPU6050_IIC_SLAVE_0 

slave0

MPU6050_IIC_SLAVE_1 

slave1

MPU6050_IIC_SLAVE_2 

slave2

MPU6050_IIC_SLAVE_3 

slave3

MPU6050_IIC_SLAVE_4 

slave4

Definition at line 231 of file driver_mpu6050.h.

◆ mpu6050_iic_status_t

mpu6050 iic status enumeration definition

Enumerator
MPU6050_IIC_STATUS_PASS_THROUGH 

pass through

MPU6050_IIC_STATUS_IIC_SLV4_DONE 

slave4 done

MPU6050_IIC_STATUS_IIC_LOST_ARB 

lost arbitration

MPU6050_IIC_STATUS_IIC_SLV4_NACK 

slave4 nack

MPU6050_IIC_STATUS_IIC_SLV3_NACK 

slave3 nack

MPU6050_IIC_STATUS_IIC_SLV2_NACK 

slave2 nack

MPU6050_IIC_STATUS_IIC_SLV1_NACK 

slave1 nack

MPU6050_IIC_STATUS_IIC_SLV0_NACK 

slave0 nack

Definition at line 313 of file driver_mpu6050.h.

◆ mpu6050_iic_transaction_mode_t

mpu6050 iic transaction mode enumeration definition

Enumerator
MPU6050_IIC_TRANSACTION_MODE_DATA 

data only

MPU6050_IIC_TRANSACTION_MODE_REG_DATA 

write a register address prior to reading or writing data

Definition at line 284 of file driver_mpu6050.h.

◆ mpu6050_interrupt_t

mpu6050 interrupt enumeration definition

Enumerator
MPU6050_INTERRUPT_MOTION 

motion

MPU6050_INTERRUPT_FIFO_OVERFLOW 

fifo overflow

MPU6050_INTERRUPT_I2C_MAST 

i2c master

MPU6050_INTERRUPT_DMP 

dmp

MPU6050_INTERRUPT_DATA_READY 

data ready

Definition at line 219 of file driver_mpu6050.h.

◆ mpu6050_low_pass_filter_t

mpu6050 low pass filter enumeration definition

Enumerator
MPU6050_LOW_PASS_FILTER_0 

bandwidth(Hz) fs(KHz) delay(ms) bandwidth(Hz) fs(KHz) delay(ms) 260 1 0 256 8 0.98

MPU6050_LOW_PASS_FILTER_1 

184 1 2.0 188 1 1.9

MPU6050_LOW_PASS_FILTER_2 

94 1 3.0 98 1 2.8

MPU6050_LOW_PASS_FILTER_3 

44 1 4.9 42 1 4.8

MPU6050_LOW_PASS_FILTER_4 

21 1 8.5 20 1 8.3

MPU6050_LOW_PASS_FILTER_5 

10 1 13.8 10 1 13.4

MPU6050_LOW_PASS_FILTER_6 

5 1 19.0 5 1 18.6

Definition at line 143 of file driver_mpu6050.h.

◆ mpu6050_pin_level_t

mpu6050 pin level enumeration definition

Enumerator
MPU6050_PIN_LEVEL_HIGH 

active low

MPU6050_PIN_LEVEL_LOW 

active high

Definition at line 201 of file driver_mpu6050.h.

◆ mpu6050_pin_type_t

mpu6050 pin type enumeration definition

Enumerator
MPU6050_PIN_TYPE_PUSH_PULL 

push pull

MPU6050_PIN_TYPE_OPEN_DRAIN 

open drain

Definition at line 210 of file driver_mpu6050.h.

◆ mpu6050_signal_path_reset_t

mpu6050 signal path reset enumeration definition

Enumerator
MPU6050_SIGNAL_PATH_RESET_TEMP 

temperature sensor analog and digital signal paths

MPU6050_SIGNAL_PATH_RESET_ACCEL 

accelerometer analog and digital signal paths

MPU6050_SIGNAL_PATH_RESET_GYRO 

gyroscope analog and digital signal paths

Definition at line 118 of file driver_mpu6050.h.

◆ mpu6050_source_t

mpu6050 source enumeration definition

Enumerator
MPU6050_SOURCE_ACC_X 

accelerometer x

MPU6050_SOURCE_ACC_Y 

accelerometer y

MPU6050_SOURCE_ACC_Z 

accelerometer z

MPU6050_SOURCE_GYRO_X 

gyroscope x

MPU6050_SOURCE_GYRO_Y 

gyroscope y

MPU6050_SOURCE_GYRO_Z 

gyroscope z

Definition at line 91 of file driver_mpu6050.h.

◆ mpu6050_wake_up_frequency_t

mpu6050 wake up frequency enumeration definition

Enumerator
MPU6050_WAKE_UP_FREQUENCY_1P25_HZ 

1.25Hz

MPU6050_WAKE_UP_FREQUENCY_5_HZ 

5Hz

MPU6050_WAKE_UP_FREQUENCY_20_HZ 

20Hz

MPU6050_WAKE_UP_FREQUENCY_40_HZ 

40Hz

Definition at line 71 of file driver_mpu6050.h.

Function Documentation

◆ mpu6050_deinit()

uint8_t mpu6050_deinit ( mpu6050_handle_t * handle)

close the chip

Parameters
[in]*handlepointer to an mpu6050 handle structure
Returns
status code
  • 0 success
  • 1 iic deinit failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 enter sleep mode failed
Note
none

Definition at line 3837 of file driver_mpu6050.c.

◆ mpu6050_device_reset()

uint8_t mpu6050_device_reset ( mpu6050_handle_t * handle)

reset the chip

Parameters
[in]*handlepointer to an mpu6050 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 4683 of file driver_mpu6050.c.

◆ mpu6050_fifo_get()

uint8_t mpu6050_fifo_get ( mpu6050_handle_t * handle,
uint8_t * buf,
uint16_t len )

fifo read bytes

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*bufpointer to a data buffer
[in]lenbuffer length
Returns
status code
  • 0 success
  • 1 fifo read failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 5298 of file driver_mpu6050.c.

◆ mpu6050_fifo_reset()

uint8_t mpu6050_fifo_reset ( mpu6050_handle_t * handle)

reset the fifo

Parameters
[in]*handlepointer to an mpu6050 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 4440 of file driver_mpu6050.c.

◆ mpu6050_fifo_set()

uint8_t mpu6050_fifo_set ( mpu6050_handle_t * handle,
uint8_t * buf,
uint16_t len )

fifo write bytes

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]*bufpointer to a data buffer
[in]lenbuffer length
Returns
status code
  • 0 success
  • 1 fifo write failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 5334 of file driver_mpu6050.c.

◆ mpu6050_force_fifo_reset()

uint8_t mpu6050_force_fifo_reset ( mpu6050_handle_t * handle)

force reset the fifo

Parameters
[in]*handlepointer to an mpu6050 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 4324 of file driver_mpu6050.c.

◆ mpu6050_get_accelerometer_range()

uint8_t mpu6050_get_accelerometer_range ( mpu6050_handle_t * handle,
mpu6050_accelerometer_range_t * range )

get the accelerometer range

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*rangepointer 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 5943 of file driver_mpu6050.c.

◆ mpu6050_get_accelerometer_test()

uint8_t mpu6050_get_accelerometer_test ( mpu6050_handle_t * handle,
mpu6050_axis_t axis,
mpu6050_bool_t * enable )

get the accelerometer test

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]axistested axis
[out]*enablepointer 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 5861 of file driver_mpu6050.c.

◆ mpu6050_get_accelerometer_x_test()

uint8_t mpu6050_get_accelerometer_x_test ( mpu6050_handle_t * handle,
uint8_t * data )

get the accelerometer x test

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*datapointer 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 7089 of file driver_mpu6050.c.

◆ mpu6050_get_accelerometer_y_test()

uint8_t mpu6050_get_accelerometer_y_test ( mpu6050_handle_t * handle,
uint8_t * data )

get the accelerometer y test

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*datapointer 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 7202 of file driver_mpu6050.c.

◆ mpu6050_get_accelerometer_z_test()

uint8_t mpu6050_get_accelerometer_z_test ( mpu6050_handle_t * handle,
uint8_t * data )

get the accelerometer z test

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*datapointer 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 7315 of file driver_mpu6050.c.

◆ mpu6050_get_addr_pin()

uint8_t mpu6050_get_addr_pin ( mpu6050_handle_t * handle,
mpu6050_address_t * addr_pin )

get the chip address pin

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*addr_pinpointer to a chip address pin buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 3693 of file driver_mpu6050.c.

◆ mpu6050_get_clock_source()

uint8_t mpu6050_get_clock_source ( mpu6050_handle_t * handle,
mpu6050_clock_source_t * clock_source )

get the chip clock source

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*clock_sourcepointer 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 4811 of file driver_mpu6050.c.

◆ mpu6050_get_cycle_wake_up()

uint8_t mpu6050_get_cycle_wake_up ( mpu6050_handle_t * handle,
mpu6050_bool_t * enable )

get the cycle wake up mode status

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*enablepointer 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 4975 of file driver_mpu6050.c.

◆ mpu6050_get_device_reset()

uint8_t mpu6050_get_device_reset ( mpu6050_handle_t * handle,
mpu6050_bool_t * enable )

get the device reset status

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*enablepointer 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 4729 of file driver_mpu6050.c.

◆ mpu6050_get_extern_sync()

uint8_t mpu6050_get_extern_sync ( mpu6050_handle_t * handle,
mpu6050_extern_sync_t * sync )

get the extern sync type

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*syncpointer 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 5529 of file driver_mpu6050.c.

◆ mpu6050_get_fifo()

uint8_t mpu6050_get_fifo ( mpu6050_handle_t * handle,
mpu6050_bool_t * enable )

get the fifo status

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*enablepointer 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 4288 of file driver_mpu6050.c.

◆ mpu6050_get_fifo_count()

uint8_t mpu6050_get_fifo_count ( mpu6050_handle_t * handle,
uint16_t * count )

get the fifo counter value

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*countpointer 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 5260 of file driver_mpu6050.c.

◆ mpu6050_get_fifo_enable()

uint8_t mpu6050_get_fifo_enable ( mpu6050_handle_t * handle,
mpu6050_fifo_t fifo,
mpu6050_bool_t * enable )

get the fifo function status

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]fifofifo type
[out]*enablepointer 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 6027 of file driver_mpu6050.c.

◆ mpu6050_get_fifo_reset()

uint8_t mpu6050_get_fifo_reset ( mpu6050_handle_t * handle,
mpu6050_bool_t * enable )

get the fifo reset status

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*enablepointer 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 4485 of file driver_mpu6050.c.

◆ mpu6050_get_fsync_interrupt()

uint8_t mpu6050_get_fsync_interrupt ( mpu6050_handle_t * handle,
mpu6050_bool_t * enable )

get the fsync interrupt status

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*enablepointer 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 6519 of file driver_mpu6050.c.

◆ mpu6050_get_fsync_interrupt_level()

uint8_t mpu6050_get_fsync_interrupt_level ( mpu6050_handle_t * handle,
mpu6050_pin_level_t * level )

get the fsync interrupt level

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*levelpointer 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 6437 of file driver_mpu6050.c.

◆ mpu6050_get_gyroscope_range()

uint8_t mpu6050_get_gyroscope_range ( mpu6050_handle_t * handle,
mpu6050_gyroscope_range_t * range )

get the gyroscope range

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*rangepointer 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 5777 of file driver_mpu6050.c.

◆ mpu6050_get_gyroscope_test()

uint8_t mpu6050_get_gyroscope_test ( mpu6050_handle_t * handle,
mpu6050_axis_t axis,
mpu6050_bool_t * enable )

get the gyroscope test

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]axistested axis
[out]*enablepointer 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 5695 of file driver_mpu6050.c.

◆ mpu6050_get_gyroscope_x_test()

uint8_t mpu6050_get_gyroscope_x_test ( mpu6050_handle_t * handle,
uint8_t * data )

get the gyroscope x test

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*datapointer 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 6809 of file driver_mpu6050.c.

◆ mpu6050_get_gyroscope_y_test()

uint8_t mpu6050_get_gyroscope_y_test ( mpu6050_handle_t * handle,
uint8_t * data )

get the gyroscope y test

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*datapointer 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 6897 of file driver_mpu6050.c.

◆ mpu6050_get_gyroscope_z_test()

uint8_t mpu6050_get_gyroscope_z_test ( mpu6050_handle_t * handle,
uint8_t * data )

get the gyroscope z test

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*datapointer 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 6985 of file driver_mpu6050.c.

◆ mpu6050_get_iic4_data_in()

uint8_t mpu6050_get_iic4_data_in ( mpu6050_handle_t * handle,
uint8_t * data )

get the iic4 data in

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*datapointer 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 10521 of file driver_mpu6050.c.

◆ mpu6050_get_iic4_data_out()

uint8_t mpu6050_get_iic4_data_out ( mpu6050_handle_t * handle,
uint8_t * data )

get the iic4 data out

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*datapointer 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 10451 of file driver_mpu6050.c.

◆ mpu6050_get_iic4_enable()

uint8_t mpu6050_get_iic4_enable ( mpu6050_handle_t * handle,
mpu6050_bool_t * enable )

get the iic4 status

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*enablepointer 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 10126 of file driver_mpu6050.c.

◆ mpu6050_get_iic4_interrupt()

uint8_t mpu6050_get_iic4_interrupt ( mpu6050_handle_t * handle,
mpu6050_bool_t * enable )

get the iic4 interrupt status

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*enablepointer 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 10208 of file driver_mpu6050.c.

◆ mpu6050_get_iic4_transaction_mode()

uint8_t mpu6050_get_iic4_transaction_mode ( mpu6050_handle_t * handle,
mpu6050_iic4_transaction_mode_t * mode )

get the iic4 transaction mode

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*modepointer 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 10290 of file driver_mpu6050.c.

◆ mpu6050_get_iic_address()

uint8_t mpu6050_get_iic_address ( mpu6050_handle_t * handle,
mpu6050_iic_slave_t slave,
uint8_t * addr_7bit )

get the iic address

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]slaveiic slave number
[out]*addr_7bitpointer 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 8571 of file driver_mpu6050.c.

◆ mpu6050_get_iic_bypass()

uint8_t mpu6050_get_iic_bypass ( mpu6050_handle_t * handle,
mpu6050_bool_t * enable )

get the iic bypass status

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*enablepointer 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 6601 of file driver_mpu6050.c.

◆ mpu6050_get_iic_byte_swap()

uint8_t mpu6050_get_iic_byte_swap ( mpu6050_handle_t * handle,
mpu6050_iic_slave_t slave,
mpu6050_bool_t * enable )

get the iic byte swap status

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]slaveiic slave number
[out]*enablepointer 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 9294 of file driver_mpu6050.c.

◆ mpu6050_get_iic_clock()

uint8_t mpu6050_get_iic_clock ( mpu6050_handle_t * handle,
mpu6050_iic_clock_t * clk )

get the iic clock

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*clkpointer 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 7790 of file driver_mpu6050.c.

◆ mpu6050_get_iic_data_out()

uint8_t mpu6050_get_iic_data_out ( mpu6050_handle_t * handle,
mpu6050_iic_slave_t slave,
uint8_t * data )

get the iic data out

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]slaveiic slave number
[out]*datapointer 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 8911 of file driver_mpu6050.c.

◆ mpu6050_get_iic_delay()

uint8_t mpu6050_get_iic_delay ( mpu6050_handle_t * handle,
uint8_t * delay )

get the iic delay

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*delaypointer 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 10379 of file driver_mpu6050.c.

◆ mpu6050_get_iic_delay_enable()

uint8_t mpu6050_get_iic_delay_enable ( mpu6050_handle_t * handle,
mpu6050_iic_delay_t delay,
mpu6050_bool_t * enable )

get the iic delay status

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]delayiic delay
[out]*enablepointer 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 10044 of file driver_mpu6050.c.

◆ mpu6050_get_iic_enable()

uint8_t mpu6050_get_iic_enable ( mpu6050_handle_t * handle,
mpu6050_iic_slave_t slave,
mpu6050_bool_t * enable )

get the iic status

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]slaveiic slave number
[out]*enablepointer 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 9100 of file driver_mpu6050.c.

◆ mpu6050_get_iic_fifo_enable()

uint8_t mpu6050_get_iic_fifo_enable ( mpu6050_handle_t * handle,
mpu6050_iic_slave_t slave,
mpu6050_bool_t * enable )

get the iic fifo status

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]slaveiic slave number
[out]*enablepointer 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 8153 of file driver_mpu6050.c.

◆ mpu6050_get_iic_group_order()

uint8_t mpu6050_get_iic_group_order ( mpu6050_handle_t * handle,
mpu6050_iic_slave_t slave,
mpu6050_iic_group_order_t * order )

get the iic group order

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]slaveiic slave number
[out]*orderpointer 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 9682 of file driver_mpu6050.c.

◆ mpu6050_get_iic_master()

uint8_t mpu6050_get_iic_master ( mpu6050_handle_t * handle,
mpu6050_bool_t * enable )

get the iic master status

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*enablepointer 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 4404 of file driver_mpu6050.c.

◆ mpu6050_get_iic_master_reset()

uint8_t mpu6050_get_iic_master_reset ( mpu6050_handle_t * handle,
mpu6050_bool_t * enable )

get the iic master reset status

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*enablepointer 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 4566 of file driver_mpu6050.c.

◆ mpu6050_get_iic_mode()

uint8_t mpu6050_get_iic_mode ( mpu6050_handle_t * handle,
mpu6050_iic_slave_t slave,
mpu6050_iic_mode_t * mode )

get the iic mode

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]slaveiic slave number
[out]*modepointer 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 8347 of file driver_mpu6050.c.

◆ mpu6050_get_iic_multi_master()

uint8_t mpu6050_get_iic_multi_master ( mpu6050_handle_t * handle,
mpu6050_bool_t * enable )

get the iic multi master status

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*enablepointer 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 7872 of file driver_mpu6050.c.

◆ mpu6050_get_iic_read_mode()

uint8_t mpu6050_get_iic_read_mode ( mpu6050_handle_t * handle,
mpu6050_iic_read_mode_t * mode )

get the iic read mode

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*modepointer 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 8036 of file driver_mpu6050.c.

◆ mpu6050_get_iic_register()

uint8_t mpu6050_get_iic_register ( mpu6050_handle_t * handle,
mpu6050_iic_slave_t slave,
uint8_t * reg )

get the iic register

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]slaveiic slave number
[out]*regpointer 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 8749 of file driver_mpu6050.c.

◆ mpu6050_get_iic_status()

uint8_t mpu6050_get_iic_status ( mpu6050_handle_t * handle,
uint8_t * status )

get the iic status

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*statuspointer 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 9962 of file driver_mpu6050.c.

◆ mpu6050_get_iic_transaction_mode()

uint8_t mpu6050_get_iic_transaction_mode ( mpu6050_handle_t * handle,
mpu6050_iic_slave_t slave,
mpu6050_iic_transaction_mode_t * mode )

get the iic transaction mode

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]slaveiic slave number
[out]*modepointer 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 9488 of file driver_mpu6050.c.

◆ mpu6050_get_iic_transferred_len()

uint8_t mpu6050_get_iic_transferred_len ( mpu6050_handle_t * handle,
mpu6050_iic_slave_t slave,
uint8_t * len )

get the iic transferred length

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]slaveiic slave number
[out]*lenpointer 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 9883 of file driver_mpu6050.c.

◆ mpu6050_get_iic_wait_for_external_sensor()

uint8_t mpu6050_get_iic_wait_for_external_sensor ( mpu6050_handle_t * handle,
mpu6050_bool_t * enable )

get the iic wait for external sensor status

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*enablepointer 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 7954 of file driver_mpu6050.c.

◆ mpu6050_get_interrupt()

uint8_t mpu6050_get_interrupt ( mpu6050_handle_t * handle,
mpu6050_interrupt_t type,
mpu6050_bool_t * enable )

get the interrupt status

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]typeset interrupt type
[out]*enablepointer 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 6685 of file driver_mpu6050.c.

◆ mpu6050_get_interrupt_latch()

uint8_t mpu6050_get_interrupt_latch ( mpu6050_handle_t * handle,
mpu6050_bool_t * enable )

get the interrupt latch status

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*enablepointer 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 6273 of file driver_mpu6050.c.

◆ mpu6050_get_interrupt_level()

uint8_t mpu6050_get_interrupt_level ( mpu6050_handle_t * handle,
mpu6050_pin_level_t * level )

get the interrupt level

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*levelpointer 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 6109 of file driver_mpu6050.c.

◆ mpu6050_get_interrupt_pin_type()

uint8_t mpu6050_get_interrupt_pin_type ( mpu6050_handle_t * handle,
mpu6050_pin_type_t * type )

get the interrupt pin type

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*typepointer 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 6191 of file driver_mpu6050.c.

◆ mpu6050_get_interrupt_read_clear()

uint8_t mpu6050_get_interrupt_read_clear ( mpu6050_handle_t * handle,
mpu6050_bool_t * enable )

get the interrupt reading clear status

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*enablepointer 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 6355 of file driver_mpu6050.c.

◆ mpu6050_get_interrupt_status()

uint8_t mpu6050_get_interrupt_status ( mpu6050_handle_t * handle,
uint8_t * status )

get the interrupt status

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*statuspointer 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 6722 of file driver_mpu6050.c.

◆ mpu6050_get_low_pass_filter()

uint8_t mpu6050_get_low_pass_filter ( mpu6050_handle_t * handle,
mpu6050_low_pass_filter_t * filter )

get the low pass filter

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*filterpointer 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 5611 of file driver_mpu6050.c.

◆ mpu6050_get_motion_duration()

uint8_t mpu6050_get_motion_duration ( mpu6050_handle_t * handle,
uint8_t * duration )

get the motion duration

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*durationpointer to a duration buffer
Returns
status code
  • 0 success
  • 1 get motion duration failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 7519 of file driver_mpu6050.c.

◆ mpu6050_get_motion_threshold()

uint8_t mpu6050_get_motion_threshold ( mpu6050_handle_t * handle,
uint8_t * threshold )

get the motion_threshold

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*thresholdpointer 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 7395 of file driver_mpu6050.c.

◆ mpu6050_get_sample_rate_divider()

uint8_t mpu6050_get_sample_rate_divider ( mpu6050_handle_t * handle,
uint8_t * d )

get the sample rate divider

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*dpointer 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 5449 of file driver_mpu6050.c.

◆ mpu6050_get_sensor_reset()

uint8_t mpu6050_get_sensor_reset ( mpu6050_handle_t * handle,
mpu6050_bool_t * enable )

get the sensor reset status

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*enablepointer 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 4647 of file driver_mpu6050.c.

◆ mpu6050_get_sleep()

uint8_t mpu6050_get_sleep ( mpu6050_handle_t * handle,
mpu6050_bool_t * enable )

get the sleep status

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*enablepointer 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 5057 of file driver_mpu6050.c.

◆ mpu6050_get_standby_mode()

uint8_t mpu6050_get_standby_mode ( mpu6050_handle_t * handle,
mpu6050_source_t source,
mpu6050_bool_t * enable )

get the source mode

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]sourceinput source
[out]*enablepointer 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 5141 of file driver_mpu6050.c.

◆ mpu6050_get_temperature_sensor()

uint8_t mpu6050_get_temperature_sensor ( mpu6050_handle_t * handle,
mpu6050_bool_t * enable )

get the temperature sensor status

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*enablepointer 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 4893 of file driver_mpu6050.c.

◆ mpu6050_get_wake_up_frequency()

uint8_t mpu6050_get_wake_up_frequency ( mpu6050_handle_t * handle,
mpu6050_wake_up_frequency_t * frequency )

get the wake up frequency

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*frequencypointer to a wake up frequency buffer
Returns
status code
  • 0 success
  • 1 get wake up frequency failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 5223 of file driver_mpu6050.c.

◆ mpu6050_iic_master_reset()

uint8_t mpu6050_iic_master_reset ( mpu6050_handle_t * handle)

reset the iic master controller

Parameters
[in]*handlepointer to an mpu6050 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 4521 of file driver_mpu6050.c.

◆ mpu6050_info()

uint8_t mpu6050_info ( mpu6050_info_t * info)

get the chip's information

Parameters
[out]*infopointer to an mpu6050 info structure
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 10650 of file driver_mpu6050.c.

◆ mpu6050_init()

uint8_t mpu6050_init ( mpu6050_handle_t * handle)

initialize the chip

Parameters
[in]*handlepointer to an mpu6050 handle structure
Returns
status code
  • 0 success
  • 1 iic initialization failed
  • 2 handle is NULL
  • 3 linked functions is NULL
  • 4 reset failed
  • 5 id is invalid
Note
none

Definition at line 3717 of file driver_mpu6050.c.

◆ mpu6050_irq_handler()

uint8_t mpu6050_irq_handler ( mpu6050_handle_t * handle)

irq handler

Parameters
[in]*handlepointer to an mpu6050 handle structure
Returns
status code
  • 0 success
  • 1 run failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 4171 of file driver_mpu6050.c.

◆ mpu6050_motion_duration_convert_to_data()

uint8_t mpu6050_motion_duration_convert_to_data ( mpu6050_handle_t * handle,
uint8_t reg,
uint8_t * ms )

convert the register raw data to the motion duration

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]regregister raw data
[out]*mspointer to a motion duration buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 7581 of file driver_mpu6050.c.

◆ mpu6050_motion_duration_convert_to_register()

uint8_t mpu6050_motion_duration_convert_to_register ( mpu6050_handle_t * handle,
uint8_t ms,
uint8_t * reg )

convert the motion duration to the register raw data

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]msmotion duration
[out]*regpointer to a register raw buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 7554 of file driver_mpu6050.c.

◆ mpu6050_motion_threshold_convert_to_data()

uint8_t mpu6050_motion_threshold_convert_to_data ( mpu6050_handle_t * handle,
uint8_t reg,
float * mg )

convert the register raw data to the motion threshold

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]regregister raw data
[out]*mgpointer to a motion threshold buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 7457 of file driver_mpu6050.c.

◆ mpu6050_motion_threshold_convert_to_register()

uint8_t mpu6050_motion_threshold_convert_to_register ( mpu6050_handle_t * handle,
float mg,
uint8_t * reg )

convert the motion threshold to the register raw data

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]mgmotion threshold
[out]*regpointer to a register raw buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 7430 of file driver_mpu6050.c.

◆ mpu6050_read()

uint8_t mpu6050_read ( mpu6050_handle_t * handle,
int16_t(*) accel_raw[3],
float(*) accel_g[3],
int16_t(*) gyro_raw[3],
float(*) gyro_dps[3],
uint16_t * len )

read the data

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]**accel_rawpointer to an accel raw data buffer
[out]**accel_gpointer to a converted accel data buffer
[out]**gyro_rawpointer to a gyro raw data buffer
[out]**gyro_dpspointer to a converted gyro data buffer
[in,out]*lenpointer 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
none

Definition at line 3891 of file driver_mpu6050.c.

◆ mpu6050_read_extern_sensor_data()

uint8_t mpu6050_read_extern_sensor_data ( mpu6050_handle_t * handle,
uint8_t * data,
uint8_t len )

read the extern sensor data

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*datapointer to a data buffer
[in]lendata 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 10558 of file driver_mpu6050.c.

◆ mpu6050_read_temperature()

uint8_t mpu6050_read_temperature ( mpu6050_handle_t * handle,
int16_t * raw,
float * degrees )

read the temperature

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*rawpointer to raw data buffer
[out]*degreespointer 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 4134 of file driver_mpu6050.c.

◆ mpu6050_self_test()

uint8_t mpu6050_self_test ( mpu6050_handle_t * handle,
int32_t gyro_offset_raw[3],
int32_t accel_offset_raw[3] )

run the self test

Parameters
[in]*handlepointer to an mpu6050 handle structure
[out]*gyro_offset_rawpointer to a gyro offset raw buffer
[out]*accel_offset_rawpointer 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 7661 of file driver_mpu6050.c.

◆ mpu6050_sensor_reset()

uint8_t mpu6050_sensor_reset ( mpu6050_handle_t * handle)

reset all sensors

Parameters
[in]*handlepointer to an mpu6050 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 4602 of file driver_mpu6050.c.

◆ mpu6050_set_accelerometer_range()

uint8_t mpu6050_set_accelerometer_range ( mpu6050_handle_t * handle,
mpu6050_accelerometer_range_t range )

set the accelerometer range

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]rangeaccelerometer 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 5898 of file driver_mpu6050.c.

◆ mpu6050_set_accelerometer_test()

uint8_t mpu6050_set_accelerometer_test ( mpu6050_handle_t * handle,
mpu6050_axis_t axis,
mpu6050_bool_t enable )

set the accelerometer test

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]axistested axis
[in]enablebool 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 5815 of file driver_mpu6050.c.

◆ mpu6050_set_accelerometer_x_test()

uint8_t mpu6050_set_accelerometer_x_test ( mpu6050_handle_t * handle,
uint8_t data )

set the accelerometer x test

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]dataset data
Returns
status code
  • 0 success
  • 1 set accelerometer x test failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 data is over 0x1F
Note
none

Definition at line 7022 of file driver_mpu6050.c.

◆ mpu6050_set_accelerometer_y_test()

uint8_t mpu6050_set_accelerometer_y_test ( mpu6050_handle_t * handle,
uint8_t data )

set the accelerometer y test

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]dataset data
Returns
status code
  • 0 success
  • 1 set accelerometer y test failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 data is over 0x1F
Note
none

Definition at line 7135 of file driver_mpu6050.c.

◆ mpu6050_set_accelerometer_z_test()

uint8_t mpu6050_set_accelerometer_z_test ( mpu6050_handle_t * handle,
uint8_t data )

set the accelerometer z test

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]dataset data
Returns
status code
  • 0 success
  • 1 set accelerometer z test failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 data is over 0x1F
Note
none

Definition at line 7248 of file driver_mpu6050.c.

◆ mpu6050_set_addr_pin()

uint8_t mpu6050_set_addr_pin ( mpu6050_handle_t * handle,
mpu6050_address_t addr_pin )

set the chip address pin

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]addr_pinchip address pin
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 3672 of file driver_mpu6050.c.

◆ mpu6050_set_clock_source()

uint8_t mpu6050_set_clock_source ( mpu6050_handle_t * handle,
mpu6050_clock_source_t clock_source )

set the chip clock source

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]clock_sourcechip 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 4766 of file driver_mpu6050.c.

◆ mpu6050_set_cycle_wake_up()

uint8_t mpu6050_set_cycle_wake_up ( mpu6050_handle_t * handle,
mpu6050_bool_t enable )

enable or disable the cycle wake up mode

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]enablebool 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 4930 of file driver_mpu6050.c.

◆ mpu6050_set_extern_sync()

uint8_t mpu6050_set_extern_sync ( mpu6050_handle_t * handle,
mpu6050_extern_sync_t sync )

set the extern sync type

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]syncextern 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 5484 of file driver_mpu6050.c.

◆ mpu6050_set_fifo()

uint8_t mpu6050_set_fifo ( mpu6050_handle_t * handle,
mpu6050_bool_t enable )

enable or disable fifo

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set fifo failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 4243 of file driver_mpu6050.c.

◆ mpu6050_set_fifo_enable()

uint8_t mpu6050_set_fifo_enable ( mpu6050_handle_t * handle,
mpu6050_fifo_t fifo,
mpu6050_bool_t enable )

enable or disable the fifo function

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]fifofifo type
[in]enablebool 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 5981 of file driver_mpu6050.c.

◆ mpu6050_set_force_accel_sample()

uint8_t mpu6050_set_force_accel_sample ( mpu6050_handle_t * handle,
mpu6050_bool_t enable )

enable or disable force accel sample

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set force accel sample failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 7608 of file driver_mpu6050.c.

◆ mpu6050_set_fsync_interrupt()

uint8_t mpu6050_set_fsync_interrupt ( mpu6050_handle_t * handle,
mpu6050_bool_t enable )

enable or disable the fsync interrupt

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]enablebool 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 6474 of file driver_mpu6050.c.

◆ mpu6050_set_fsync_interrupt_level()

uint8_t mpu6050_set_fsync_interrupt_level ( mpu6050_handle_t * handle,
mpu6050_pin_level_t level )

set the fsync interrupt level

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]levelset 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 6392 of file driver_mpu6050.c.

◆ mpu6050_set_gyroscope_range()

uint8_t mpu6050_set_gyroscope_range ( mpu6050_handle_t * handle,
mpu6050_gyroscope_range_t range )

set the gyroscope range

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]rangegyroscope 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 5732 of file driver_mpu6050.c.

◆ mpu6050_set_gyroscope_test()

uint8_t mpu6050_set_gyroscope_test ( mpu6050_handle_t * handle,
mpu6050_axis_t axis,
mpu6050_bool_t enable )

set the gyroscope test

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]axistested axis
[in]enablebool 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 5649 of file driver_mpu6050.c.

◆ mpu6050_set_gyroscope_x_test()

uint8_t mpu6050_set_gyroscope_x_test ( mpu6050_handle_t * handle,
uint8_t data )

set the gyroscope x test

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]dataset data
Returns
status code
  • 0 success
  • 1 set gyroscope x test failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 data is over 0x1F
Note
none

Definition at line 6758 of file driver_mpu6050.c.

◆ mpu6050_set_gyroscope_y_test()

uint8_t mpu6050_set_gyroscope_y_test ( mpu6050_handle_t * handle,
uint8_t data )

set the gyroscope y test

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]dataset data
Returns
status code
  • 0 success
  • 1 set gyroscope y test failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 data is over 0x1F
Note
none

Definition at line 6846 of file driver_mpu6050.c.

◆ mpu6050_set_gyroscope_z_test()

uint8_t mpu6050_set_gyroscope_z_test ( mpu6050_handle_t * handle,
uint8_t data )

set the gyroscope z test

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]dataset data
Returns
status code
  • 0 success
  • 1 set gyroscope z test failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 data is over 0x1F
Note
none

Definition at line 6934 of file driver_mpu6050.c.

◆ mpu6050_set_iic4_data_in()

uint8_t mpu6050_set_iic4_data_in ( mpu6050_handle_t * handle,
uint8_t data )

set the iic4 data in

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]dataset 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 10486 of file driver_mpu6050.c.

◆ mpu6050_set_iic4_data_out()

uint8_t mpu6050_set_iic4_data_out ( mpu6050_handle_t * handle,
uint8_t data )

set the iic4 data out

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]dataset 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 10416 of file driver_mpu6050.c.

◆ mpu6050_set_iic4_enable()

uint8_t mpu6050_set_iic4_enable ( mpu6050_handle_t * handle,
mpu6050_bool_t enable )

enable or disable the iic4

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]enablebool 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 10081 of file driver_mpu6050.c.

◆ mpu6050_set_iic4_interrupt()

uint8_t mpu6050_set_iic4_interrupt ( mpu6050_handle_t * handle,
mpu6050_bool_t enable )

enable or disable the iic4 interrupt

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]enablebool 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 10163 of file driver_mpu6050.c.

◆ mpu6050_set_iic4_transaction_mode()

uint8_t mpu6050_set_iic4_transaction_mode ( mpu6050_handle_t * handle,
mpu6050_iic4_transaction_mode_t mode )

set the iic4 transaction mode

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]modetransaction 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 10245 of file driver_mpu6050.c.

◆ mpu6050_set_iic_address()

uint8_t mpu6050_set_iic_address ( mpu6050_handle_t * handle,
mpu6050_iic_slave_t slave,
uint8_t addr_7bit )

set the iic address

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]slaveiic slave number
[in]addr_7bitiic 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 8439 of file driver_mpu6050.c.

◆ mpu6050_set_iic_bypass()

uint8_t mpu6050_set_iic_bypass ( mpu6050_handle_t * handle,
mpu6050_bool_t enable )

enable or disable the iic bypass

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]enablebool 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 6556 of file driver_mpu6050.c.

◆ mpu6050_set_iic_byte_swap()

uint8_t mpu6050_set_iic_byte_swap ( mpu6050_handle_t * handle,
mpu6050_iic_slave_t slave,
mpu6050_bool_t enable )

enable or disable the iic byte swap

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]slaveiic slave number
[in]enablebool 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 9181 of file driver_mpu6050.c.

◆ mpu6050_set_iic_clock()

uint8_t mpu6050_set_iic_clock ( mpu6050_handle_t * handle,
mpu6050_iic_clock_t clk )

set the iic clock

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]clkiic 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 7745 of file driver_mpu6050.c.

◆ mpu6050_set_iic_data_out()

uint8_t mpu6050_set_iic_data_out ( mpu6050_handle_t * handle,
mpu6050_iic_slave_t slave,
uint8_t data )

set the iic data out

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]slaveiic slave number
[in]dataset 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 8835 of file driver_mpu6050.c.

◆ mpu6050_set_iic_delay()

uint8_t mpu6050_set_iic_delay ( mpu6050_handle_t * handle,
uint8_t delay )

set the iic delay

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]delayiic 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 10328 of file driver_mpu6050.c.

◆ mpu6050_set_iic_delay_enable()

uint8_t mpu6050_set_iic_delay_enable ( mpu6050_handle_t * handle,
mpu6050_iic_delay_t delay,
mpu6050_bool_t enable )

enable or disable the iic delay

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]delayiic delay
[in]enablebool 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 9998 of file driver_mpu6050.c.

◆ mpu6050_set_iic_enable()

uint8_t mpu6050_set_iic_enable ( mpu6050_handle_t * handle,
mpu6050_iic_slave_t slave,
mpu6050_bool_t enable )

enable or disable the iic

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]slaveiic slave number
[in]enablebool 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 8987 of file driver_mpu6050.c.

◆ mpu6050_set_iic_fifo_enable()

uint8_t mpu6050_set_iic_fifo_enable ( mpu6050_handle_t * handle,
mpu6050_iic_slave_t slave,
mpu6050_bool_t enable )

enable or disable the iic fifo

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]slaveiic slave number
[in]enablebool 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 8075 of file driver_mpu6050.c.

◆ mpu6050_set_iic_group_order()

uint8_t mpu6050_set_iic_group_order ( mpu6050_handle_t * handle,
mpu6050_iic_slave_t slave,
mpu6050_iic_group_order_t order )

set the iic group order

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]slaveiic slave number
[in]ordergroup 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 9569 of file driver_mpu6050.c.

◆ mpu6050_set_iic_master()

uint8_t mpu6050_set_iic_master ( mpu6050_handle_t * handle,
mpu6050_bool_t enable )

enable or disable the iic master mode

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]enablebool 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 4359 of file driver_mpu6050.c.

◆ mpu6050_set_iic_mode()

uint8_t mpu6050_set_iic_mode ( mpu6050_handle_t * handle,
mpu6050_iic_slave_t slave,
mpu6050_iic_mode_t mode )

set the iic mode

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]slaveiic slave number
[in]modeiic 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 8215 of file driver_mpu6050.c.

◆ mpu6050_set_iic_multi_master()

uint8_t mpu6050_set_iic_multi_master ( mpu6050_handle_t * handle,
mpu6050_bool_t enable )

enable or disable iic multi master

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]enablebool 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 7827 of file driver_mpu6050.c.

◆ mpu6050_set_iic_read_mode()

uint8_t mpu6050_set_iic_read_mode ( mpu6050_handle_t * handle,
mpu6050_iic_read_mode_t mode )

set the iic read mode

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]moderead 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 7991 of file driver_mpu6050.c.

◆ mpu6050_set_iic_register()

uint8_t mpu6050_set_iic_register ( mpu6050_handle_t * handle,
mpu6050_iic_slave_t slave,
uint8_t reg )

set the iic register

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]slaveiic slave number
[in]regiic 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 8663 of file driver_mpu6050.c.

◆ mpu6050_set_iic_transaction_mode()

uint8_t mpu6050_set_iic_transaction_mode ( mpu6050_handle_t * handle,
mpu6050_iic_slave_t slave,
mpu6050_iic_transaction_mode_t mode )

set the iic transaction mode

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]slaveiic slave number
[in]modeiic 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 9375 of file driver_mpu6050.c.

◆ mpu6050_set_iic_transferred_len()

uint8_t mpu6050_set_iic_transferred_len ( mpu6050_handle_t * handle,
mpu6050_iic_slave_t slave,
uint8_t len )

set the iic transferred length

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]slaveiic slave number
[in]leniic 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 9764 of file driver_mpu6050.c.

◆ mpu6050_set_iic_wait_for_external_sensor()

uint8_t mpu6050_set_iic_wait_for_external_sensor ( mpu6050_handle_t * handle,
mpu6050_bool_t enable )

enable or disable iic wait for external sensor

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]enablebool 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 7909 of file driver_mpu6050.c.

◆ mpu6050_set_interrupt()

uint8_t mpu6050_set_interrupt ( mpu6050_handle_t * handle,
mpu6050_interrupt_t type,
mpu6050_bool_t enable )

enable or disable the interrupt

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]typeset interrupt type
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set interrupt failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 6639 of file driver_mpu6050.c.

◆ mpu6050_set_interrupt_latch()

uint8_t mpu6050_set_interrupt_latch ( mpu6050_handle_t * handle,
mpu6050_bool_t enable )

enable or disable the interrupt latch

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]enablebool 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 6228 of file driver_mpu6050.c.

◆ mpu6050_set_interrupt_level()

uint8_t mpu6050_set_interrupt_level ( mpu6050_handle_t * handle,
mpu6050_pin_level_t level )

set the interrupt level

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]levelinterrupt 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 6064 of file driver_mpu6050.c.

◆ mpu6050_set_interrupt_pin_type()

uint8_t mpu6050_set_interrupt_pin_type ( mpu6050_handle_t * handle,
mpu6050_pin_type_t type )

set the interrupt pin type

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]typeinterrupt 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 6146 of file driver_mpu6050.c.

◆ mpu6050_set_interrupt_read_clear()

uint8_t mpu6050_set_interrupt_read_clear ( mpu6050_handle_t * handle,
mpu6050_bool_t enable )

enable or disable the interrupt reading clear

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]enablebool 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 6310 of file driver_mpu6050.c.

◆ mpu6050_set_low_pass_filter()

uint8_t mpu6050_set_low_pass_filter ( mpu6050_handle_t * handle,
mpu6050_low_pass_filter_t filter )

set the low pass filter

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]filterlow 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 5566 of file driver_mpu6050.c.

◆ mpu6050_set_motion_duration()

uint8_t mpu6050_set_motion_duration ( mpu6050_handle_t * handle,
uint8_t duration )

set the motion duration

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]durationset duration
Returns
status code
  • 0 success
  • 1 set motion duration failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 7484 of file driver_mpu6050.c.

◆ mpu6050_set_motion_threshold()

uint8_t mpu6050_set_motion_threshold ( mpu6050_handle_t * handle,
uint8_t threshold )

set the motion_threshold

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]thresholdset 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 7360 of file driver_mpu6050.c.

◆ mpu6050_set_sample_rate_divider()

uint8_t mpu6050_set_sample_rate_divider ( mpu6050_handle_t * handle,
uint8_t d )

set the sample rate divider

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]dsample 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 5414 of file driver_mpu6050.c.

◆ mpu6050_set_signal_path_reset()

uint8_t mpu6050_set_signal_path_reset ( mpu6050_handle_t * handle,
mpu6050_signal_path_reset_t path )

set the signal path reset

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]pathsignal 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 5369 of file driver_mpu6050.c.

◆ mpu6050_set_sleep()

uint8_t mpu6050_set_sleep ( mpu6050_handle_t * handle,
mpu6050_bool_t enable )

enable or disable the sleep mode

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set sleep failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 5012 of file driver_mpu6050.c.

◆ mpu6050_set_standby_mode()

uint8_t mpu6050_set_standby_mode ( mpu6050_handle_t * handle,
mpu6050_source_t source,
mpu6050_bool_t enable )

set source into standby mode

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]sourceinput source
[in]enablebool 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 5095 of file driver_mpu6050.c.

◆ mpu6050_set_temperature_sensor()

uint8_t mpu6050_set_temperature_sensor ( mpu6050_handle_t * handle,
mpu6050_bool_t enable )

enable or disable the temperature sensor

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]enablebool 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 4848 of file driver_mpu6050.c.

◆ mpu6050_set_wake_up_frequency()

uint8_t mpu6050_set_wake_up_frequency ( mpu6050_handle_t * handle,
mpu6050_wake_up_frequency_t frequency )

set the wake up frequency

Parameters
[in]*handlepointer to an mpu6050 handle structure
[in]frequencywake up frequency
Returns
status code
  • 0 success
  • 1 set wake up frequency failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 5178 of file driver_mpu6050.c.