37#define MPU6500_I2C_ADDR (0x68U << 1)
43#define MPU6500_SLEEP_WAKE_MASK 0xBFU
46#define MPU6500_REG_WHO_AM_I 0x75U
47#define MPU6500_REG_PWR_MGMT_1 0x6BU
48#define MPU6500_REG_ACCEL_CONFIG 0x1CU
49#define MPU6500_REG_GYRO_CONFIG 0x1BU
52#define MPU6500_REG_ACCEL_MEASURE 0x3BU
55#define MPU6500_REG_GYRO_MEASURE 0x43U
63 MPU6500_ACC_SET_2G = 0x00,
64 MPU6500_ACC_SET_4G = 0x08,
65 MPU6500_ACC_SET_8G = 0x10,
66 MPU6500_ACC_SET_16G = 0x18,
71 MPU6500_Gyro_SET_250 = 0x00,
72 MPU6500_Gyro_SET_500 = 0x08,
73 MPU6500_Gyro_SET_1000 = 0x10,
74 MPU6500_Gyro_SET_2000 = 0x18,
128 int8_t (*write)(uint16_t dev_addr, uint16_t reg_addr, uint8_t *p_data,
139 int8_t (*read)(uint16_t dev_addr, uint16_t reg_addr, uint8_t *p_data,
146 void (*delay_ms)(uint32_t milliseconds);
150 int8_t Gyro_Offset_Calibration[3];
230 int8_t return_offset[3]);
int8_t MPU6500_SetRotationRange(MPU6500_Config *config, Gyro_Range range)
Set the gyroscope full-scale range.
Definition mpu6500.c:138
int8_t MPU6500_Read_Gyro_Data(MPU6500_Config *config, MPU6500_Gyro_Data *Gyro_Data)
Read and process gyroscope data in a single blocking call.
Definition mpu6500.c:183
int8_t MPU6500_SetAccelRange(MPU6500_Config *config, Accel_Range range)
Set the accelerometer full-scale range.
Definition mpu6500.c:95
int8_t MPU6500_Read_Accel_Data(MPU6500_Config *config, MPU6500_Accel_Data *Accel_Data)
Read and process accelerometer data in a single blocking call.
Definition mpu6500.c:210
int8_t MPU6500_Gyro_Calibration(MPU6500_Config *config, int8_t return_offset[3])
Calibrate gyroscope zero-rate offsets.
Definition mpu6500.c:236
int8_t MPU6500_Init(MPU6500_Config *config)
Initialize the MPU6500 sensor.
Definition mpu6500.c:54
Gyro_Range
Full-scale gyroscope range register values.
Definition mpu6500.h:70
Accel_Range
Full-scale accelerometer range register values.
Definition mpu6500.h:62
Gyro_Calculation
Internal index for gyroscope sensitivity lookup.
Definition mpu6500.h:88
Accel_Calculation
Internal index for accelerometer sensitivity lookup.
Definition mpu6500.h:80
int8_t MPU6500_Read_Gyro_DMA(MPU6500_Config *config, uint8_t raw_buf[6])
Start a gyroscope I2C read into a caller-owned buffer.
Definition mpu6500.c:283
void MPU6500_Process_Accel_DMA(MPU6500_Config *config, const uint8_t raw_buf[6], MPU6500_Accel_Data *data)
Process a completed accelerometer raw buffer into scaled output.
Definition mpu6500.c:308
void MPU6500_Process_Gyro_DMA(MPU6500_Config *config, const uint8_t raw_buf[6], MPU6500_Gyro_Data *data)
Process a completed gyroscope raw buffer into scaled output.
Definition mpu6500.c:291
int8_t MPU6500_Read_Accel_DMA(MPU6500_Config *config, uint8_t raw_buf[6])
Start an accelerometer I2C read into a caller-owned buffer.
Definition mpu6500.c:287
Processed accelerometer output in g-force (g).
Definition mpu6500.h:105
Driver configuration and platform abstraction.
Definition mpu6500.h:119
Accel_Calculation Accel_Setting
Definition mpu6500.h:148
Gyro_Calculation Gyro_Setting
Definition mpu6500.h:149
Processed gyroscope output in degrees per second (dps).
Definition mpu6500.h:98