123456789101112131415161718192021222324252627282930 |
- /**
- *********************************************************************************************************
- * xmk guide
- *
- * (c) Copyright 2016-2020, hualijidian.com
- * All Rights Reserved
- *
- * @file driver.h
- * @author eric
- * @brief
- * @date 2017��10��10��
- * @version V0.0.1
- *********************************************************************************************************
- */
- #ifndef __DRIVER_H_
- #define __DRIVER_H_
- #include "stdint.h"
- #include "env.h"
- void DRSetAction(uint8_t act);
- uint8_t drDirFbNav(void);
- uint8_t drDirLrNav(void);
- #define DR_HOME_PCT_DEG 1000
- #define DR_PER_DEG 10
- #define DRFAngle2Pulse(a) (Cfg.FStrPlsDeg * (DR_HOME_PCT_DEG + (a)))
- #define DRFPulse2Angle(p) ((p)/Cfg.FStrPlsDeg - DR_HOME_PCT_DEG)
- #define DRBAngle2Pulse(a) (Cfg.BStrPlsDeg * (DR_HOME_PCT_DEG + (a)))
- #define DRBPulse2Angle(p) ((p)/Cfg.BStrPlsDeg - DR_HOME_PCT_DEG)
- #endif /* __DRIVER_H_ */
|