|
MPU6500 Bare-Metal Driver
Public API reference for the MPU6500 driver
|
Split-phase DMA/interrupt-friendly API functions. More...

Functions | |
| 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. | |
Split-phase DMA/interrupt-friendly API functions.
| 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.
Pure computation — no I/O. Combines raw bytes and applies sensitivity scaling. Call only after the I2C transfer has completed.
| raw_buf | 6-byte buffer containing completed accel register data. |
| data | Output struct for processed accel values (g). |
References MPU6500_Config::Accel_Setting.
| 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.
Pure computation — no I/O. Combines raw bytes, applies sensitivity scaling and calibration offsets. Call only after the I2C transfer has completed.
| raw_buf | 6-byte buffer containing completed gyro register data. |
| data | Output struct for processed gyro values (dps). |
References MPU6500_Config::Gyro_Offset_Calibration, and MPU6500_Config::Gyro_Setting.
Referenced by MPU6500_Gyro_Calibration().
| int8_t MPU6500_Read_Accel_DMA | ( | MPU6500_Config * | config, |
| uint8_t | raw_buf[6] | ||
| ) |
Start an accelerometer I2C read into a caller-owned buffer.
Initiates a 6-byte read from the accel data registers. For non-blocking implementations, this returns immediately; the caller must wait for I/O completion before calling MPU6500_Process_Accel_DMA().
| config | Driver configuration. |
| raw_buf | Caller-owned 6-byte buffer (must not be a local/stack variable if using non-blocking I/O). |
References MPU6500_I2C_ADDR, MPU6500_REG_ACCEL_MEASURE, and MPU6500_Config::read.
| int8_t MPU6500_Read_Gyro_DMA | ( | MPU6500_Config * | config, |
| uint8_t | raw_buf[6] | ||
| ) |
Start a gyroscope I2C read into a caller-owned buffer.
Initiates a 6-byte read from the gyro data registers. For non-blocking implementations, this returns immediately; the caller must wait for I/O completion before calling MPU6500_Process_Gyro_DMA().
| config | Driver configuration. |
| raw_buf | Caller-owned 6-byte buffer (must not be a local/stack variable if using non-blocking I/O). |
References MPU6500_I2C_ADDR, MPU6500_REG_GYRO_MEASURE, and MPU6500_Config::read.
Referenced by MPU6500_Gyro_Calibration().