1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- #ifndef USER_ENCODE_H
- #define USER_ENCODE_H
- #define X30EXTI_IOIN PDin(13)
- #define X31EXTI_IOIN PDin(12)
- #define X20EXTI_IOIN PDin(0)
- typedef struct
- {
- long cRealPosi;
- } cEncodeAxis_t;
- int GetEncodeCount(void);
- void SetEncodeCount(int encodepulse);
- void EncoderInit(void);
- extern float BMGearRatio,BM_SEVORGearRatio;
- extern long GetEncodePos(void);
- extern void SetEncodePos(long pos);
- extern cEncodeAxis_t cEncodeAxis;
- extern long axis_position_encode;//编码器方式计数
- //机器配置
- extern unsigned char USE_ENCODE;
- extern unsigned char USE_X30_EXTI;
- extern unsigned char USE_X31_EXTI;
- extern unsigned char USE_X20_EXTI;
- extern unsigned char USE_TIMER_X30_EXTI;
- extern unsigned char USE_TIMER_X31_EXTI;
- extern unsigned char USE_EXTEND_INOUTPUT;
- extern unsigned char USE_EXTEND_ALARM;
- extern unsigned long EXTI_TIMER_FREQ;
- extern unsigned char FILTER_P;
- extern unsigned char FILTER_N;
- //0配置高速接口上升沿中断,1为下降沿,3为上下沿中断
- extern unsigned char X30EXTI_DIR;
- extern unsigned char X31EXTI_DIR;
- extern unsigned char X20EXTI_DIR;
- extern void EXTI30Enable(void);
- extern void EXTI30Disable(void);
- extern void EXTI20Enable(void);
- extern void EXTI20Disable(void);
- #endif
|