TP_microcontroleur/timer_act2/Includes/Driver_TIMER.h
2021-09-24 16:19:06 +02:00

18 lines
360 B
C

#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) ;
#define MyTimer_Base_Start(Timer) (Timer->CR1 |= 0x1)
#define MyTimer_Base_Stop(Timer) (Timer->CR1 &= ~0x1)
#endif