NinjaFlight
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
accgyro_spi_mpu6000.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #define MPU6000_CONFIG 0x1A
5 
6 #define BITS_DLPF_CFG_256HZ 0x00
7 #define BITS_DLPF_CFG_188HZ 0x01
8 #define BITS_DLPF_CFG_98HZ 0x02
9 #define BITS_DLPF_CFG_42HZ 0x03
10 
11 #define GYRO_SCALE_FACTOR 0.00053292f // (4/131) * pi/180 (32.75 LSB = 1 DPS)
12 
13 #define MPU6000_WHO_AM_I_CONST (0x68)
14 
15 bool mpu6000SpiDetect(void);
16 
19 
20 bool mpu6000WriteRegister(uint8_t reg, uint8_t data);
21 bool mpu6000ReadRegister(uint8_t reg, uint8_t length, uint8_t *data);
Definition: accgyro.h:58
bool mpu6000WriteRegister(uint8_t reg, uint8_t data)
Definition: accgyro_spi_mpu6000.c:104
struct gyro_config gyro
Definition: config.h:93
struct accelerometer_config acc
Definition: config.h:93
bool mpu6000ReadRegister(uint8_t reg, uint8_t length, uint8_t *data)
Definition: accgyro_spi_mpu6000.c:114
bool mpu6000SpiDetect(void)
Definition: accgyro_spi_mpu6000.c:151
bool mpu6000SpiGyroDetect(gyro_t *gyro)
Definition: accgyro_spi_mpu6000.c:263
Definition: accgyro.h:50
bool mpu6000SpiAccDetect(acc_t *acc)
Definition: accgyro_spi_mpu6000.c:251
uint16_t data
Definition: config.c:91