dl-dwd.h 910 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * dl-dwd.h
  3. *
  4. * Created on: 2019��6��20��
  5. * Author: Eric
  6. */
  7. #ifndef DRIVER_DL_DWD_H_
  8. #define DRIVER_DL_DWD_H_
  9. #include <stdbool.h>
  10. #include <stdint.h>
  11. /* ת������Ҫʵ�ֵĺ��� */
  12. typedef bool (*McSteerInit_t)(void);
  13. typedef bool (*McSteerProcess_t)(void);
  14. typedef bool (*McSteerQueryProcess_t)(void);
  15. typedef bool (*McSteerParesQuery_t)(uint16_t canId, uint8_t *data);
  16. /* ���ߵ����Ҫʵ�ֵĺ��� */
  17. typedef bool (*McWalkInit_t)(void);
  18. typedef bool (*McWalkProcess_t)(void);
  19. typedef bool (*McWalkQueryProcess_t)(void);
  20. typedef bool (*McWalkParse_t)(uint16_t canId, uint8_t *data);
  21. typedef bool (*McLiftInit_t)(void);
  22. typedef bool (*McLiftProcess_t)(void);
  23. #define DrAngleToPulse(a) (Cfg.MtsPlsDeg * (DR_HOME_PCT_DEG + (a)) / DR_PER_DEG)
  24. #define DrPulseToAngle(p) ((p)*DR_PER_DEG/Cfg.MtsPlsDeg - DR_HOME_PCT_DEG)
  25. #endif /* DRIVER_DL_DWD_H_ */