bsp_protocol.h 486 B

1234567891011121314151617181920212223242526272829303132
  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. };
  9. enum _CMD_MOTION{
  10. MOTION_STOP = 0,
  11. MOTION_RUN,
  12. MOTION_JUMP,
  13. MOTION_DOWN,
  14. MOTION_LEFT,
  15. MOTION_RIGHT,
  16. MOTION_FRONT,
  17. MOTION_BACK,
  18. MOTION_LEFT_UP,
  19. MOTION_LEFT_DOWN,
  20. MOTION_RIGHT_UP,
  21. MOTION_RIGHT_DOWN,
  22. MOTION_STEP,
  23. NUMBERS_OF_MOTION,
  24. };
  25. void send_protocol(uint8_t index,uint8_t cmd,uint8_t* dat,uint8_t datLen);
  26. #endif