#include "stm32f10x.h" #include "../../Drivers/gpiodriver.h" #include "../../Drivers/timerdriver.h" void ToggleLed(void) { MyGPIO_Toggle(GPIOA,5); } int main (void) { MyGPIO_Struct_TypeDef led = {GPIOA,5,Out_PullUp}; //led MyTimer_Struct_TypeDef timer2 = {TIM2,499,7199}; //timer //init & start LED, Timer MyGPIO_Init(&led); MyTimer_Base_Init(&timer2); MyTimer_Base_Start(TIM2); //Init Interruption & Activate Init_Periph(ToggleLed); MyTimer_ActiveIT(TIM2,2); do{ }while(1) ; }