| | |
| | | #define CMD_WRITE 2 |
| | | #define CMD_REPLY 3 |
| | | |
| | | //自定义 |
| | | #define CMD_BLE_TO_MK 1 |
| | | #define CMD_MK_TO_BLE 2 |
| | | #define CMD_MK_REPLY 2 |
| | | |
| | | #define BIND_DISTANCE_FOR_TAG 1 |
| | | #define DELETE_ALL 2 |
| | | #define DELETE_PART 3 |
| | | #define SET_DISTANCE_DETERMINATION 4 |
| | | #define SET_FREQUENCE_BY_DISTANCE 5 |
| | | |
| | | #define APP_CONFIG_IAPFLAG_MAP 0x0402D010 |
| | | #define APP_CONFIG_IAPFLAG_SECTOR_ADDR 0x0402D000 |
| | | |
| | |
| | | UsartReceiveWaitData, |
| | | UsartReceiveWaitChecksum// |
| | | }UsartRecvPackState; |
| | | // 定义状态枚举 |
| | | typedef enum { |
| | | Usart0ReceiveWaitHead0, |
| | | Usart0ReceiveWaitHead1, |
| | | Usart0ReceiveWaitCmdType, |
| | | Usart0ReceiveWaitMsgType, |
| | | Usart0ReceiveWaitDataLen, |
| | | Usart0ReceiveWaitParamAddr, |
| | | Usart0ReceiveWaitData, |
| | | Usart0ReceiveWaitChecksum1, |
| | | Usart0ReceiveWaitChecksum2, |
| | | } Usart0ReceiveState; |
| | | extern uint8_t mUsartReceivePack[100]; |
| | | extern uint8_t mUsart2ReceivePack[150]; |
| | | |
| | | void UsartParseDataHandler(uint8_t data); |
| | | void Usart1ParseDataHandler(uint8_t data); |
| | | |
| | | void Usart2ParseDataHandler(uint8_t data); |
| | | void Usart0ParseDataHandler(uint8_t data); |
| | | |
| | | void UpdateProcess(uint8_t index); |
| | | #endif |