|
MPU6500 Bare-Metal Driver
Public API reference for the MPU6500 driver
|
Platform-agnostic MPU6500 6-axis IMU driver. More...
#include <stdint.h>

Go to the source code of this file.
Data Structures | |
| struct | MPU6500_Gyro_Data |
| Processed gyroscope output in degrees per second (dps). More... | |
| struct | MPU6500_Accel_Data |
| Processed accelerometer output in g-force (g). More... | |
| struct | MPU6500_Config |
| Driver configuration and platform abstraction. More... | |
Enumerations | |
| enum | Accel_Range { MPU6500_ACC_SET_2G = 0x00 , MPU6500_ACC_SET_4G = 0x08 , MPU6500_ACC_SET_8G = 0x10 , MPU6500_ACC_SET_16G = 0x18 } |
| Full-scale accelerometer range register values. | |
| enum | Gyro_Range { MPU6500_Gyro_SET_250 = 0x00 , MPU6500_Gyro_SET_500 = 0x08 , MPU6500_Gyro_SET_1000 = 0x10 , MPU6500_Gyro_SET_2000 = 0x18 } |
| Full-scale gyroscope range register values. | |
| enum | Accel_Calculation { MPU6500_Accel_2G = 0 , MPU6500_Accel_4G , MPU6500_Accel_8G , MPU6500_Accel_16G } |
| Internal index for accelerometer sensitivity lookup. | |
| enum | Gyro_Calculation { MPU6500_Gyro_250 = 0 , MPU6500_Gyro_500 , MPU6500_Gyro_1000 , MPU6500_Gyro_2000 } |
| Internal index for gyroscope sensitivity lookup. | |
Functions | |
| int8_t | MPU6500_Init (MPU6500_Config *config) |
| Initialize the MPU6500 sensor. | |
| int8_t | MPU6500_SetAccelRange (MPU6500_Config *config, Accel_Range range) |
| Set the accelerometer full-scale range. | |
| int8_t | MPU6500_SetRotationRange (MPU6500_Config *config, Gyro_Range range) |
| Set the gyroscope full-scale range. | |
| int8_t | MPU6500_Read_Gyro_Data (MPU6500_Config *config, MPU6500_Gyro_Data *Gyro_Data) |
| Read and process gyroscope data in a single blocking call. | |
| int8_t | MPU6500_Read_Accel_Data (MPU6500_Config *config, MPU6500_Accel_Data *Accel_Data) |
| Read and process accelerometer data in a single blocking call. | |
| int8_t | MPU6500_Gyro_Calibration (MPU6500_Config *config, int8_t return_offset[3]) |
| Calibrate gyroscope zero-rate offsets. | |
| int8_t | MPU6500_Read_Gyro_DMA (MPU6500_Config *config, uint8_t raw_buf[6]) |
| Start a gyroscope I2C read into a caller-owned buffer. | |
| int8_t | MPU6500_Read_Accel_DMA (MPU6500_Config *config, uint8_t raw_buf[6]) |
| Start an accelerometer I2C read into a caller-owned buffer. | |
| 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. | |
| 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. | |
Platform-agnostic MPU6500 6-axis IMU driver.
Provides both a blocking API (for polling/blocking I2C) and a split-phase non-blocking API (for DMA or interrupt-driven I2C). The driver is decoupled from any specific HAL through user-supplied function pointers in MPU6500_Config.