bsp_protocol.h 753 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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 =0xA1,
  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_BASEINFO=0,
  23. UPDATE_RUN,
  24. NUMBERS_OF_UPDATE,
  25. };
  26. typedef enum
  27. {
  28. OutGameMode_cmd,//退出游戏模式
  29. InGameMode_cmd,//进入游戏模式
  30. }gamemode_cmd;
  31. void send_protocol(uint8_t index,uint8_t cmd,uint8_t* dat,uint8_t datLen);
  32. void send_protocol_game(gamemode_cmd cmd,uint8_t SendTime,uint8_t SendInternal_ms);
  33. #if ESB_RECV_SEND_TEST
  34. extern void Esb_Test_Send(void);
  35. #endif
  36. #endif