38 lines
716 B
C
38 lines
716 B
C
#ifndef MT6701_H
|
|
#define MT6701_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define PI 3.14159265359f
|
|
#define _2PI 6.28318530718f
|
|
|
|
#define I2C_TX_PACKET_SIZE (1)
|
|
#define I2C_RX_PACKET_SIZE (2)
|
|
|
|
struct AS5600_Sensor {
|
|
int Mot_num;
|
|
float Angle;
|
|
float velocity;
|
|
float full_rotations;
|
|
float Last_Angle;
|
|
float Last_Vel_ts;
|
|
float Vel_Last_Angle;
|
|
};
|
|
|
|
void Set_Sensor(int Mot);
|
|
void MT6701_iic_read_angel(void);
|
|
void MT6701_get_angle_degree(void);
|
|
float GetAngle(struct AS5600_Sensor *AS5600);
|
|
float GetAngle_NoTrack(struct AS5600_Sensor *AS5600);
|
|
float GetVelocity(struct AS5600_Sensor *AS5600_Vel);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* MT6701_H */
|