2024-11-06 22:26:06 +08:00
|
|
|
#include "main.h"
|
2024-11-07 13:49:33 +08:00
|
|
|
//Tanslate angle into Capture Compare Register value
|
2024-11-07 21:23:17 +08:00
|
|
|
#define ANGLETOCCR(angle) (2000 * (angle) / 180 + 500)
|
2024-11-06 22:26:06 +08:00
|
|
|
|
2024-11-07 16:26:27 +08:00
|
|
|
extern int16_t Servo_Speed,Servo_goal,Servo_position;
|
2024-11-06 22:26:06 +08:00
|
|
|
|
|
|
|
void Servo_SetAngle(int goal);
|
|
|
|
int Servo_toward(void);
|