#include "stm32f10x.h" #include #include #include #include int a ; void Callback(void){ startADC(); a=read(); } int main (void) // (PSC+1)*(ARR+1)/fClk { MyTimer_Struct_TypeDef Tim_Conf_Servo = { TIM4, 1199, 1199 }; MyGPIO_Struct_TypeDef GPIOB8={ GPIOB, 8, AltOut_Ppull }; MyTimer_Base_Init(&Tim_Conf_Servo); // MyGPIO_Init(&GPIOB8); MyTimer_PWM(TIM4,3); Set_Duty_Cycle(TIM4,3,0.08*Get_Max_Duty(TIM4)); //Set_PWM_PRCT(TIM4,3,10); MyTimer_Base_Start(TIM4); while (1) {} }