123456789101112131415161718192021222324252627282930313233343536 |
- #ifndef bexus_mpu_h
- #define bexus_mpu_h
- #ifdef __cplusplus
- extern "C" {
- #endif
- //#include "FreeRTOS.h"
- #include "i2c.h"
- #include "bexus_variables.h"
- #include "bexus_sysclock.h"
- #include "main.h"
- #include "Math.h"
- #include <string.h>
- #define MPU_ADDR 0xD0
- #define RAD_TO_DEG (180/3.141592)
- #define DIV_180_PI (180/3.141592)
- #define MPU_ADDR_ACCEL 0x3B
- #define MPU_ADDR_GYRO 0x43
- void Mpu_Init(void);
- int Bexus_Mpu_Read(void);
- int sendByteToMpu(uint8_t* data, uint8_t len);
- void ConfigMpu(uint8_t reg, uint8_t data);
- uint8_t recvByteFromMpu(uint8_t reg);
- int16_t recvIntFromMpu(uint8_t reg);
- #ifdef __cplusplus
- }
- #endif
- #endif
|