2025-11-10 18:05:11 +08:00
|
|
|
#ifndef MT6701_H
|
|
|
|
|
#define MT6701_H
|
|
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C"
|
|
|
|
|
{
|
|
|
|
|
#endif
|
2025-11-10 18:22:44 +08:00
|
|
|
|
|
|
|
|
#define PI 3.14159265359f
|
|
|
|
|
#define _2PI 6.28318530718f
|
|
|
|
|
|
2025-11-10 18:05:11 +08:00
|
|
|
#define I2C_TX_PACKET_SIZE (1)
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Number of bytes to received from target.
|
|
|
|
|
* This example uses FIFO with polling, and the maximum FIFO size is 8.
|
|
|
|
|
* Refer to interrupt examples to handle larger packets
|
|
|
|
|
*/
|
|
|
|
|
#define I2C_RX_PACKET_SIZE (2)
|
|
|
|
|
void MT6701_iic_read_angel(void);
|
|
|
|
|
void MT6701_get_angle_degree(void);
|
2025-11-10 18:22:44 +08:00
|
|
|
float GetAngle(void);
|
|
|
|
|
float GetAngle_NoTrack(void);
|
|
|
|
|
float GetVelocity(void);
|
2025-11-10 18:05:11 +08:00
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#endif /* MT6701_H */
|