Voilier/Drivers/Include/Driver_Timer.h

20 lines
421 B
C

#ifndef MYTIMER_H
#define MYTIMER_H
#include "stm32f10x.h"
typedef struct
{
TIM_TypeDef * Timer;
unsigned short ARR;
unsigned short PSC;
} MyTimer_Struct_TypeDef;
void MyTimer_Base_Init(MyTimer_Struct_TypeDef * Timer, void (*fct)(void));
void MyTimer_Base_Start(TIM_TypeDef * Timer);
void MyTimer_Base_Stop(TIM_TypeDef * Timer);
void MyTimer_PWM( MyTimer_Struct_TypeDef * Timer, uint16_t cycle);
#endif