123456789101112131415161718192021222324252627282930313233343536373839404142 |
- #ifndef __bsp_protocol_h__
- #define __bsp_protocol_h__
- #include "main.h"
- #define DEX_NUM 0
- enum _cmd{
- CMD_HEART = 0,
- CMD_MOTION,
- CMD_UPDATE =0xA1,
- };
- enum _CMD_MOTION{
- MOTION_STOP = 0,
- MOTION_RUN,
- MOTION_JUMP,
- MOTION_DOWN,
- MOTION_LEFT,
- MOTION_RIGHT,
- MOTION_FRONT,
- MOTION_BACK,
-
- NUMBERS_OF_MOTION,
- };
- enum _CMD_UPDATE{
- UPDATE_BASEINFO=0,
- UPDATE_RUN,
- NUMBERS_OF_UPDATE,
- };
- typedef enum
- {
- OutGameMode_cmd,//退出游戏模式
- InGameMode_cmd,//进入游戏模式
- }gamemode_cmd;
- void send_protocol(uint8_t index,uint8_t cmd,uint8_t* dat,uint8_t datLen);
- void send_protocol_game(gamemode_cmd cmd,uint8_t SendTime,uint8_t SendInternal_ms);
- #if ESB_RECV_SEND_TEST
- extern void Esb_Test_Send(void);
- #endif
- #endif
|