11 #include <sys/ioctl.h> 23 #define SMPRT_DIV 0x19 25 #define GYRO_CONFIG 0x1B 26 #define ACCEL_CONFIG 0x1C 28 #define USER_CTRL 0x6A 29 #define PWR_MGMT_1 0x6B 30 #define PWR_MGMT_2 0x6C 31 #define I2C_MST_CTRL 0x24 44 #define CALIB_COUNT 100 51 void initMPU6050(i2c_t *sensor);
53 void timer_mark(
struct timeval *pTvMark);
55 uint_t timer_elapsed(
struct timeval *pTvMark);
57 void Seti2cReg(i2c_t *sensor, uint8_t registr, uint8_t buffr);
59 float ReadSingleValue(i2c_t *sensor, uint8_t highRegistr, uint8_t lowRegistr);
61 void BulkUpdate(i2c_t *sensor,
62 float *acx,
float *acy,
float *acz,
63 float *gyx,
float *gyy,
float *gyz );