#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) ;
void Activate_TIM(int) ;
void MyTimer_Active_IT ( TIM_TypeDef * , char , void (*) (void)) ;
void TIM1_TRG_COM_IRQHandler(void) ;
void TIM2_IRQHandler(void) ; 
void TIM3_IRQHandler(void) ;
void TIM4_IRQHandler(void) ;

#define MyTimer_Base_Start(Timer) (Timer->CR1 |= 0x1)
#define MyTimer_Base_Stop(Timer) (Timer->CR1 &= ~0x1)

#endif
