2024-01-20 13:19:09 +08:00
|
|
|
#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.
|
2024-01-23 15:06:39 +08:00
|
|
|
float Get_EncoderTIM4(void);
|
|
|
|
float Get_EncoderTIM3(void);
|
2024-01-20 13:19:09 +08:00
|
|
|
float PB_Get_Encode_TIM2(void);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif // #ifndef ENCODER_H
|
|
|
|
|
|
|
|
|