Renamed MPU functions to have mpu prefix
This commit is contained in:
parent
081b529027
commit
7f4617b676
|
@ -75,7 +75,7 @@ static const extiConfig_t *mpuIntExtiConfig = NULL;
|
||||||
|
|
||||||
#define MPU_INQUIRY_MASK 0x7E
|
#define MPU_INQUIRY_MASK 0x7E
|
||||||
|
|
||||||
mpuDetectionResult_t *detectMpu(const extiConfig_t *configToUse)
|
mpuDetectionResult_t *mpuDetect(const extiConfig_t *configToUse)
|
||||||
{
|
{
|
||||||
memset(&mpuDetectionResult, 0, sizeof(mpuDetectionResult));
|
memset(&mpuDetectionResult, 0, sizeof(mpuDetectionResult));
|
||||||
memset(&mpuConfiguration, 0, sizeof(mpuConfiguration));
|
memset(&mpuConfiguration, 0, sizeof(mpuConfiguration));
|
||||||
|
@ -334,7 +334,7 @@ void mpuGyroInit(gyroDev_t *gyro)
|
||||||
mpuIntExtiInit(gyro);
|
mpuIntExtiInit(gyro);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool checkMPUDataReady(gyroDev_t* gyro)
|
bool mpuCheckDataReady(gyroDev_t* gyro)
|
||||||
{
|
{
|
||||||
bool ret;
|
bool ret;
|
||||||
if (gyro->dataReady) {
|
if (gyro->dataReady) {
|
||||||
|
|
|
@ -183,10 +183,10 @@ typedef struct mpuDetectionResult_s {
|
||||||
|
|
||||||
extern mpuDetectionResult_t mpuDetectionResult;
|
extern mpuDetectionResult_t mpuDetectionResult;
|
||||||
|
|
||||||
void configureMPUDataReadyInterruptHandling(void);
|
void mpuConfigureDataReadyInterruptHandling(void);
|
||||||
struct gyroDev_s;
|
struct gyroDev_s;
|
||||||
void mpuGyroInit(struct gyroDev_s *gyro);
|
void mpuGyroInit(struct gyroDev_s *gyro);
|
||||||
bool mpuAccRead(int16_t *accData);
|
bool mpuAccRead(int16_t *accData);
|
||||||
bool mpuGyroRead(struct gyroDev_s *gyro);
|
bool mpuGyroRead(struct gyroDev_s *gyro);
|
||||||
mpuDetectionResult_t *detectMpu(const extiConfig_t *configToUse);
|
mpuDetectionResult_t *mpuDetect(const extiConfig_t *configToUse);
|
||||||
bool checkMPUDataReady(struct gyroDev_s *gyro);
|
bool mpuCheckDataReady(struct gyroDev_s *gyro);
|
||||||
|
|
|
@ -82,7 +82,7 @@ bool mpu3050Detect(gyroDev_t *gyro)
|
||||||
gyro->init = mpu3050Init;
|
gyro->init = mpu3050Init;
|
||||||
gyro->read = mpuGyroRead;
|
gyro->read = mpuGyroRead;
|
||||||
gyro->temperature = mpu3050ReadTemperature;
|
gyro->temperature = mpu3050ReadTemperature;
|
||||||
gyro->intStatus = checkMPUDataReady;
|
gyro->intStatus = mpuCheckDataReady;
|
||||||
|
|
||||||
// 16.4 dps/lsb scalefactor
|
// 16.4 dps/lsb scalefactor
|
||||||
gyro->scale = 1.0f / 16.4f;
|
gyro->scale = 1.0f / 16.4f;
|
||||||
|
|
|
@ -106,7 +106,7 @@ bool mpu6050GyroDetect(gyroDev_t *gyro)
|
||||||
}
|
}
|
||||||
gyro->init = mpu6050GyroInit;
|
gyro->init = mpu6050GyroInit;
|
||||||
gyro->read = mpuGyroRead;
|
gyro->read = mpuGyroRead;
|
||||||
gyro->intStatus = checkMPUDataReady;
|
gyro->intStatus = mpuCheckDataReady;
|
||||||
|
|
||||||
// 16.4 dps/lsb scalefactor
|
// 16.4 dps/lsb scalefactor
|
||||||
gyro->scale = 1.0f / 16.4f;
|
gyro->scale = 1.0f / 16.4f;
|
||||||
|
|
|
@ -94,7 +94,7 @@ bool mpu6500GyroDetect(gyroDev_t *gyro)
|
||||||
|
|
||||||
gyro->init = mpu6500GyroInit;
|
gyro->init = mpu6500GyroInit;
|
||||||
gyro->read = mpuGyroRead;
|
gyro->read = mpuGyroRead;
|
||||||
gyro->intStatus = checkMPUDataReady;
|
gyro->intStatus = mpuCheckDataReady;
|
||||||
|
|
||||||
// 16.4 dps/lsb scalefactor
|
// 16.4 dps/lsb scalefactor
|
||||||
gyro->scale = 1.0f / 16.4f;
|
gyro->scale = 1.0f / 16.4f;
|
||||||
|
|
|
@ -168,7 +168,7 @@ bool icm20689SpiGyroDetect(gyroDev_t *gyro)
|
||||||
|
|
||||||
gyro->init = icm20689GyroInit;
|
gyro->init = icm20689GyroInit;
|
||||||
gyro->read = mpuGyroRead;
|
gyro->read = mpuGyroRead;
|
||||||
gyro->intStatus = checkMPUDataReady;
|
gyro->intStatus = mpuCheckDataReady;
|
||||||
|
|
||||||
// 16.4 dps/lsb scalefactor
|
// 16.4 dps/lsb scalefactor
|
||||||
gyro->scale = 1.0f / 16.4f;
|
gyro->scale = 1.0f / 16.4f;
|
||||||
|
|
|
@ -274,7 +274,7 @@ bool mpu6000SpiGyroDetect(gyroDev_t *gyro)
|
||||||
|
|
||||||
gyro->init = mpu6000SpiGyroInit;
|
gyro->init = mpu6000SpiGyroInit;
|
||||||
gyro->read = mpuGyroRead;
|
gyro->read = mpuGyroRead;
|
||||||
gyro->intStatus = checkMPUDataReady;
|
gyro->intStatus = mpuCheckDataReady;
|
||||||
// 16.4 dps/lsb scalefactor
|
// 16.4 dps/lsb scalefactor
|
||||||
gyro->scale = 1.0f / 16.4f;
|
gyro->scale = 1.0f / 16.4f;
|
||||||
|
|
||||||
|
|
|
@ -134,7 +134,7 @@ bool mpu6500SpiGyroDetect(gyroDev_t *gyro)
|
||||||
|
|
||||||
gyro->init = mpu6500SpiGyroInit;
|
gyro->init = mpu6500SpiGyroInit;
|
||||||
gyro->read = mpuGyroRead;
|
gyro->read = mpuGyroRead;
|
||||||
gyro->intStatus = checkMPUDataReady;
|
gyro->intStatus = mpuCheckDataReady;
|
||||||
|
|
||||||
// 16.4 dps/lsb scalefactor
|
// 16.4 dps/lsb scalefactor
|
||||||
gyro->scale = 1.0f / 16.4f;
|
gyro->scale = 1.0f / 16.4f;
|
||||||
|
|
|
@ -229,7 +229,7 @@ bool mpu9250SpiGyroDetect(gyroDev_t *gyro)
|
||||||
|
|
||||||
gyro->init = mpu9250SpiGyroInit;
|
gyro->init = mpu9250SpiGyroInit;
|
||||||
gyro->read = mpuGyroRead;
|
gyro->read = mpuGyroRead;
|
||||||
gyro->intStatus = checkMPUDataReady;
|
gyro->intStatus = mpuCheckDataReady;
|
||||||
|
|
||||||
// 16.4 dps/lsb scalefactor
|
// 16.4 dps/lsb scalefactor
|
||||||
gyro->scale = 1.0f / 16.4f;
|
gyro->scale = 1.0f / 16.4f;
|
||||||
|
|
|
@ -91,7 +91,7 @@ bool sensorsAutodetect(const gyroConfig_t *gyroConfig,
|
||||||
|
|
||||||
const extiConfig_t *extiConfig = selectMPUIntExtiConfig();
|
const extiConfig_t *extiConfig = selectMPUIntExtiConfig();
|
||||||
|
|
||||||
mpuDetectionResult_t *mpuDetectionResult = detectMpu(extiConfig);
|
mpuDetectionResult_t *mpuDetectionResult = mpuDetect(extiConfig);
|
||||||
UNUSED(mpuDetectionResult);
|
UNUSED(mpuDetectionResult);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue