bsp_protocol.h 505 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef __bsp_protocol_h__
  2. #define __bsp_protocol_h__
  3. #include "main.h"
  4. #define DEX_NUM 0
  5. enum _cmd{
  6. CMD_HEART = 0,
  7. CMD_MOTION,
  8. CMD_UPDATE,
  9. };
  10. enum _CMD_MOTION{
  11. MOTION_STOP = 0,
  12. MOTION_RUN,
  13. MOTION_JUMP,
  14. MOTION_DOWN,
  15. MOTION_LEFT,
  16. MOTION_RIGHT,
  17. MOTION_FRONT,
  18. MOTION_BACK,
  19. NUMBERS_OF_MOTION,
  20. };
  21. enum _CMD_UPDATE{
  22. UPDATE_NONE = 0,
  23. UPDATE_RUN,
  24. UPDATE_BASEINFO,
  25. NUMBERS_OF_UPDATE,
  26. };
  27. void send_protocol(uint8_t index,uint8_t cmd,uint8_t* dat,uint8_t datLen);
  28. #endif