#include <breezystm32.h>
#include <math.h>
Go to the source code of this file.
|
enum | accel_fsr_e {
INV_FSR_2G = 0,
INV_FSR_4G,
INV_FSR_8G,
INV_FSR_16G,
NUM_ACCEL_FSR
} |
|
enum | clock_sel_e { INV_CLK_INTERNAL = 0,
INV_CLK_PLL,
NUM_CLK
} |
|
enum | gyro_fsr_e {
INV_FSR_250DPS = 0,
INV_FSR_500DPS,
INV_FSR_1000DPS,
INV_FSR_2000DPS,
NUM_GYRO_FSR
} |
|
enum | lpf_e {
INV_FILTER_256HZ_NOLPF2 = 0,
INV_FILTER_188HZ,
INV_FILTER_98HZ,
INV_FILTER_42HZ,
INV_FILTER_20HZ,
INV_FILTER_10HZ,
INV_FILTER_5HZ,
INV_FILTER_2100HZ_NOLPF,
NUM_FILTER
} |
|
|
void | EXTI15_10_IRQHandler (void) |
|
void | mpu6050_async_read_all (volatile int16_t *accData, volatile int16_t *tempData, volatile int16_t *gyroData, volatile uint64_t *timeData) |
|
void | mpu6050_exti_init (int boardVersion) |
|
void | mpu6050_init (bool enableInterrupt, uint16_t *acc1G, float *gyroScale, int boardVersion) |
|
bool | mpu6050_new_data () |
|
void | mpu6050_read_accel (int16_t *accData) |
|
void | mpu6050_read_all (int16_t *accData, int16_t *gyroData, int16_t *tempData, uint64_t *time_us) |
|
void | mpu6050_read_gyro (int16_t *gyroData) |
|
void | mpu6050_read_temperature (int16_t *tempData) |
|
void | mpu6050_request_async_update_all () |
|
static bool | mpuReadRegisterI2C (uint8_t reg, uint8_t *data, int length) |
|
static bool | mpuWriteRegisterI2C (uint8_t reg, uint8_t data) |
|
void | read_all_CB (uint8_t result) |
|
◆ GYRO_INT_PIN
◆ M_PI
◆ MPU6050_BIT_DMP_RST
#define MPU6050_BIT_DMP_RST 0x08 |
◆ MPU6050_BIT_FIFO_EN
#define MPU6050_BIT_FIFO_EN 0x40 |
◆ MPU6050_BIT_FIFO_RST
#define MPU6050_BIT_FIFO_RST 0x04 |
◆ MPU6050_INV_CLK_GYROZ
#define MPU6050_INV_CLK_GYROZ 0x03 |
◆ MPU_ADDRESS
#define MPU_ADDRESS (0x68) |
◆ MPU_RA_ACCEL_CONFIG
#define MPU_RA_ACCEL_CONFIG 0x1C |
◆ MPU_RA_ACCEL_XOUT_H
#define MPU_RA_ACCEL_XOUT_H (0x3B) |
◆ MPU_RA_CONFIG
#define MPU_RA_CONFIG 0x1A |
◆ MPU_RA_FIFO_COUNT_H
#define MPU_RA_FIFO_COUNT_H 0x72 |
◆ MPU_RA_FIFO_EN
#define MPU_RA_FIFO_EN 0x23 |
◆ MPU_RA_FIFO_R_W
#define MPU_RA_FIFO_R_W 0x74 |
◆ MPU_RA_GYRO_CONFIG
#define MPU_RA_GYRO_CONFIG 0x1B |
◆ MPU_RA_GYRO_XOUT_H
#define MPU_RA_GYRO_XOUT_H (0x43) |
◆ MPU_RA_I2C_MST_CTRL
#define MPU_RA_I2C_MST_CTRL 0x24 |
◆ MPU_RA_INT_ENABLE
#define MPU_RA_INT_ENABLE 0x38 |
◆ MPU_RA_INT_PIN_CFG
#define MPU_RA_INT_PIN_CFG 0x37 |
◆ MPU_RA_PRODUCT_ID
#define MPU_RA_PRODUCT_ID (0x0C) |
◆ MPU_RA_PWR_MGMT_1
#define MPU_RA_PWR_MGMT_1 0x6B |
◆ MPU_RA_PWR_MGMT_2
#define MPU_RA_PWR_MGMT_2 0x6C |
◆ MPU_RA_SIGNAL_PATH_RST
#define MPU_RA_SIGNAL_PATH_RST 0x68 |
◆ MPU_RA_SMPLRT_DIV
#define MPU_RA_SMPLRT_DIV 0x19 |
◆ MPU_RA_TEMP_OUT_A
#define MPU_RA_TEMP_OUT_A (0x41) |
◆ MPU_RA_USER_CTRL
#define MPU_RA_USER_CTRL 0x6A |
◆ MPU_RA_WHO_AM_I
#define MPU_RA_WHO_AM_I (0x75) |
◆ MPU_RA_XA_OFFS_H
#define MPU_RA_XA_OFFS_H (0x06) |
◆ MPUx0x0_WHO_AM_I_CONST
#define MPUx0x0_WHO_AM_I_CONST (0x68) |
◆ accel_fsr_e
Enumerator |
---|
INV_FSR_2G | |
INV_FSR_4G | |
INV_FSR_8G | |
INV_FSR_16G | |
NUM_ACCEL_FSR | |
Definition at line 81 of file drv_mpu6050.c.
◆ clock_sel_e
Enumerator |
---|
INV_CLK_INTERNAL | |
INV_CLK_PLL | |
NUM_CLK | |
Definition at line 75 of file drv_mpu6050.c.
◆ gyro_fsr_e
Enumerator |
---|
INV_FSR_250DPS | |
INV_FSR_500DPS | |
INV_FSR_1000DPS | |
INV_FSR_2000DPS | |
NUM_GYRO_FSR | |
Definition at line 67 of file drv_mpu6050.c.
◆ lpf_e
Enumerator |
---|
INV_FILTER_256HZ_NOLPF2 | |
INV_FILTER_188HZ | |
INV_FILTER_98HZ | |
INV_FILTER_42HZ | |
INV_FILTER_20HZ | |
INV_FILTER_10HZ | |
INV_FILTER_5HZ | |
INV_FILTER_2100HZ_NOLPF | |
NUM_FILTER | |
Definition at line 55 of file drv_mpu6050.c.
◆ EXTI15_10_IRQHandler()
void EXTI15_10_IRQHandler |
( |
void |
| ) |
|
◆ mpu6050_async_read_all()
void mpu6050_async_read_all |
( |
volatile int16_t * |
accData, |
|
|
volatile int16_t * |
tempData, |
|
|
volatile int16_t * |
gyroData, |
|
|
volatile uint64_t * |
timeData |
|
) |
| |
◆ mpu6050_exti_init()
void mpu6050_exti_init |
( |
int |
boardVersion | ) |
|
◆ mpu6050_init()
void mpu6050_init |
( |
bool |
enableInterrupt, |
|
|
uint16_t * |
acc1G, |
|
|
float * |
gyroScale, |
|
|
int |
boardVersion |
|
) |
| |
◆ mpu6050_new_data()
bool mpu6050_new_data |
( |
| ) |
|
◆ mpu6050_read_accel()
void mpu6050_read_accel |
( |
int16_t * |
accData | ) |
|
◆ mpu6050_read_all()
void mpu6050_read_all |
( |
int16_t * |
accData, |
|
|
int16_t * |
gyroData, |
|
|
int16_t * |
tempData, |
|
|
uint64_t * |
time_us |
|
) |
| |
◆ mpu6050_read_gyro()
void mpu6050_read_gyro |
( |
int16_t * |
gyroData | ) |
|
◆ mpu6050_read_temperature()
void mpu6050_read_temperature |
( |
int16_t * |
tempData | ) |
|
◆ mpu6050_request_async_update_all()
void mpu6050_request_async_update_all |
( |
| ) |
|
◆ mpuReadRegisterI2C()
static bool mpuReadRegisterI2C |
( |
uint8_t |
reg, |
|
|
uint8_t * |
data, |
|
|
int |
length |
|
) |
| |
|
static |
◆ mpuWriteRegisterI2C()
static bool mpuWriteRegisterI2C |
( |
uint8_t |
reg, |
|
|
uint8_t |
data |
|
) |
| |
|
static |
◆ read_all_CB()
void read_all_CB |
( |
uint8_t |
result | ) |
|
◆ accel
volatile int16_t accel[3] |
|
static |
◆ all_buffer
◆ gyro
◆ imu_time_us
◆ measurement_time
uint64_t measurement_time = 0 |
◆ mpuLowPassFilter
◆ need_to_queue_new_i2c_job
volatile bool need_to_queue_new_i2c_job = false |
|
static |
◆ new_imu_data
bool new_imu_data = false |
|
static |
◆ temp