24 lines
476 B
C
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
|