GeBalanceBot/Hardware/Firmware/GeBalanceBot_Firmware v1.0 .../DRV/bsp_timer.h

20 lines
387 B
C
Raw Normal View History

2024-01-18 01:55:04 +08:00
#ifndef __BSP_TIMER3_H
#define __BSP_TIMER3_H
#include "stm32f10x.h"
#define ENCODER_TIM_PERIOD (u16)(60000) // number of pulses per revolution
void Timer3_Init(u32 arr,int psc);
void MOTO_PWM_Init(u32 arr, int psc);
void Motor_PWMOut(u16 moto_r, u16 moto_l);
void Timer6_Init(void);
void Encoder_Init_TIM2(void);
void Encoder_Init_TIM4(void);
int Read_Encoder(u8 TIMX);
#endif