RobotHardware-UESTC/Hardware/银星机器人底盘/PiRobot-YH_Firmware v1.0/STM32/BSPLIB/encoder.h

23 lines
386 B
C

#ifndef ENCODER_H
#define ENCODER_H
#ifdef __cplusplus
extern "C" {
#endif
#include "stm32f10x.h"
void Encoder_Init(TIM_TypeDef* TIMx , unsigned char GPIO_AF);
float PB_Get_Encode_TIM5(void);//What you get here is the total angle.
float Get_EncoderTIM4(void);
float Get_EncoderTIM3(void);
float PB_Get_Encode_TIM2(void);
#ifdef __cplusplus
}
#endif
#endif // #ifndef ENCODER_H