#ifndef MYTIMER_H #define MYTIMER_H #include "stm32f10x.h" typedef struct { TIM_TypeDef * Timer ; uint16_t ARR ; uint16_t PSC ; } MyTimer_Struct_TypeDef ; void MyTimer_Base_Init(MyTimer_Struct_TypeDef * Timer) ; #define MyTimer_Base_Start(Timer) (Timer->CR1 |= 0x1) #define MyTimer_Base_Stop(Timer) (Timer->CR1 &= ~0x1) #endif