forked from logzhan/RobotHardware-UESTC
23 lines
384 B
C
23 lines
384 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 GetEncoderTIM4(void);
|
||
|
float GetEncoderTIM3(void);
|
||
|
float PB_Get_Encode_TIM2(void);
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
#endif // #ifndef ENCODER_H
|
||
|
|
||
|
|