Voilier/Drivers/Include/Driver_Timer.h
2023-03-22 16:47:21 +01:00

24 lines
476 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 MyTimer_Base_Start(TIM_TypeDef * Timer);
void MyTimer_Base_Stop(TIM_TypeDef * Timer);
void MyTimer_PWM( MyTimer_Struct_TypeDef * Timer, uint16_t cycle);
/*#define MyTimer_Base_Start(Timer)
#define MyTimer_Base_Stop(Timer)
*/
#endif