#define ANGLE_000 2 //0 度
#define ANGLE_045 10 //45 度
#define ANGLE_090 15 //90 度
#define ANGLE_135 20 //135 度
#define ANGLE_180 28 //180 度
/* 全局变量 */
static u8 CloudStand_Horizontal_Line = 15; //云台水平移动
static u8 CloudStand_Vertical_Line = 15; //云台垂直移动
/* TIM4 PWM 部分初始化, PWM 输出初始化, arr 为自动重装值; psc 为时钟
预分频数 */
static void TIM4_PWM_Init(u16 arr,u16 psc)
{
GPIO_InitTypeDef GPIO_InitStructure;
TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
TIM_OCInitTypeDef TIM_OCInitStructure;
下面切记两个 APB 时钟初始化,调用不同的初始化函数,有同学不注意,经常