#ifndef __CONTROL_H__
#define __CONTROL_H__
#include "sys.h"

#define Middle_angle           0                         // 定义平衡角度为0

int  EXTI15_10_IRQHandler(void);
int  Balance(float angle,float gyro);
int  Velocity(int encoder_left,int encoder_right);
void Motor_PWMSet(int motor_left,int motor_right);
int  Motor_PWMLimit(int IN,int max,int min);
void Key(void);
u8   Turn_Off(float angle);
void IMU_GetAngle(void);
int  myabs(int a);
#endif