530 int16_t accel_raw[3];
540 (int16_t (*)[3])&accel_raw, (
float (*)[3])&accel,
541 (int16_t (*)[3])&gyro_raw, (
float (*)[3])&gyro,
driver mpu6050 basic header file
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_init(mpu6050_handle_t *handle)
initialize the chip
uint8_t mpu6050_read_temperature(mpu6050_handle_t *handle, int16_t(*raw), float *degrees)
read the temperature
uint8_t mpu6050_set_accelerometer_range(mpu6050_handle_t *handle, mpu6050_accelerometer_range_t range)
set the accelerometer range
mpu6050_address_t
mpu6050 address enumeration definition
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_set_sample_rate_divider(mpu6050_handle_t *handle, uint8_t d)
set the sample rate divider
uint8_t mpu6050_set_gyroscope_range(mpu6050_handle_t *handle, mpu6050_gyroscope_range_t range)
set the gyroscope range
uint8_t mpu6050_set_addr_pin(mpu6050_handle_t *handle, mpu6050_address_t addr_pin)
set the chip address pin
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_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_set_fifo_enable(mpu6050_handle_t *handle, mpu6050_fifo_t fifo, mpu6050_bool_t enable)
enable or disable the fifo function
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_set_iic_bypass(mpu6050_handle_t *handle, mpu6050_bool_t enable)
enable or disable the iic bypass
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_set_cycle_wake_up(mpu6050_handle_t *handle, mpu6050_bool_t enable)
enable or disable the cycle wake up mode
uint8_t mpu6050_set_interrupt_pin_type(mpu6050_handle_t *handle, mpu6050_pin_type_t type)
set the interrupt pin type
uint8_t mpu6050_set_iic_master(mpu6050_handle_t *handle, mpu6050_bool_t enable)
enable or disable the iic master mode
uint8_t mpu6050_set_temperature_sensor(mpu6050_handle_t *handle, mpu6050_bool_t enable)
enable or disable the temperature sensor
uint8_t mpu6050_set_interrupt_latch(mpu6050_handle_t *handle, mpu6050_bool_t enable)
enable or disable the interrupt latch
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_set_extern_sync(mpu6050_handle_t *handle, mpu6050_extern_sync_t sync)
set the extern sync type
uint8_t mpu6050_set_sleep(mpu6050_handle_t *handle, mpu6050_bool_t enable)
enable or disable the sleep mode
struct mpu6050_handle_s mpu6050_handle_t
mpu6050 handle structure definition
uint8_t mpu6050_set_fifo(mpu6050_handle_t *handle, mpu6050_bool_t enable)
enable or disable fifo
uint8_t mpu6050_set_interrupt_level(mpu6050_handle_t *handle, mpu6050_pin_level_t level)
set the interrupt level
uint8_t mpu6050_set_clock_source(mpu6050_handle_t *handle, mpu6050_clock_source_t clock_source)
set the chip clock source
uint8_t mpu6050_set_fsync_interrupt(mpu6050_handle_t *handle, mpu6050_bool_t enable)
enable or disable the fsync interrupt
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_deinit(mpu6050_handle_t *handle)
close the chip
uint8_t mpu6050_set_fsync_interrupt_level(mpu6050_handle_t *handle, mpu6050_pin_level_t level)
set the fsync interrupt level
@ MPU6050_INTERRUPT_I2C_MAST
@ MPU6050_INTERRUPT_DATA_READY
@ MPU6050_INTERRUPT_FIFO_OVERFLOW
@ MPU6050_INTERRUPT_MOTION
#define MPU6050_BASIC_DEFAULT_INTERRUPT_LATCH
uint8_t mpu6050_basic_deinit(void)
basic example deinit
#define MPU6050_BASIC_DEFAULT_IIC_BYPASS
uint8_t mpu6050_basic_read_temperature(float *degrees)
basic example read temperature
#define MPU6050_BASIC_DEFAULT_INTERRUPT_DATA_READY
uint8_t mpu6050_basic_init(mpu6050_address_t addr_pin)
basic example init
#define MPU6050_BASIC_DEFAULT_INTERRUPT_DMP
#define MPU6050_BASIC_DEFAULT_GYROSCOPE_RANGE
#define MPU6050_BASIC_DEFAULT_CLOCK_SOURCE
mpu6050 basic example default definition
#define MPU6050_BASIC_DEFAULT_IIC_MASTER
#define MPU6050_BASIC_DEFAULT_FSYNC_INTERRUPT_LEVEL
#define MPU6050_BASIC_DEFAULT_LOW_PASS_FILTER
#define MPU6050_BASIC_DEFAULT_INTERRUPT_MOTION
#define MPU6050_BASIC_DEFAULT_INTERRUPT_PIN_LEVEL
#define MPU6050_BASIC_DEFAULT_INTERRUPT_READ_CLEAR
#define MPU6050_BASIC_DEFAULT_EXTERN_SYNC
uint8_t mpu6050_basic_read(float g[3], float dps[3])
basic example read
#define MPU6050_BASIC_DEFAULT_ACCELEROMETER_RANGE
#define MPU6050_BASIC_DEFAULT_INTERRUPT_FIFO_OVERFLOW
#define MPU6050_BASIC_DEFAULT_CYCLE_WAKE_UP
#define MPU6050_BASIC_DEFAULT_INTERRUPT_I2C_MAST
#define MPU6050_BASIC_DEFAULT_INTERRUPT_PIN_TYPE
#define MPU6050_BASIC_DEFAULT_WAKE_UP_FREQUENCY
#define MPU6050_BASIC_DEFAULT_FSYNC_INTERRUPT
#define MPU6050_BASIC_DEFAULT_RATE
uint8_t mpu6050_interface_iic_deinit(void)
interface iic bus deinit
uint8_t mpu6050_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
void mpu6050_interface_debug_print(const char *const fmt,...)
interface print format data
uint8_t mpu6050_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
uint8_t mpu6050_interface_iic_init(void)
interface iic bus init
void mpu6050_interface_receive_callback(uint8_t type)
interface receive callback
void mpu6050_interface_delay_ms(uint32_t ms)
interface delay ms
#define DRIVER_MPU6050_LINK_IIC_DEINIT(HANDLE, FUC)
link iic_deinit function
#define DRIVER_MPU6050_LINK_INIT(HANDLE, STRUCTURE)
initialize mpu6050_handle_t structure
#define DRIVER_MPU6050_LINK_IIC_WRITE(HANDLE, FUC)
link iic_write function
#define DRIVER_MPU6050_LINK_DELAY_MS(HANDLE, FUC)
link delay_ms function
#define DRIVER_MPU6050_LINK_DEBUG_PRINT(HANDLE, FUC)
link debug_print function
#define DRIVER_MPU6050_LINK_RECEIVE_CALLBACK(HANDLE, FUC)
link receive_callback function
#define DRIVER_MPU6050_LINK_IIC_READ(HANDLE, FUC)
link iic_read function
#define DRIVER_MPU6050_LINK_IIC_INIT(HANDLE, FUC)
link iic_init function