| | |
| | | |
| | | #define MSG_RW 3 |
| | | #define MSG_WTAG 6 |
| | | #define MSG_USERDATA 0x11 |
| | | |
| | | #define CMD_READ 1 |
| | | #define CMD_WRITE 2 |
| | |
| | | }UsartRecvPackState; |
| | | |
| | | uint8_t mUsartReceivePack[100] = {0}; |
| | | uint8_t send_frame[200]; |
| | | uint8_t send_frame[200],uartrec_userdata[20]; |
| | | void SendConfigConfirm(uint8_t pack_msgtype,uint8_t pack_length) |
| | | { |
| | | uint16_t checksum = 0; |
| | |
| | | remotesend_state=1; |
| | | memcpy(remotetag_para,mUsartReceivePack,REMOTEPARA_LEN); |
| | | break; |
| | | case MSG_USERDATA: |
| | | if(pack_datalen<20) |
| | | { |
| | | uartrec_userdata[0] = pack_index; |
| | | uartrec_userdata[1] = pack_datalen; |
| | | memcpy((uint8_t*)&uartrec_userdata[2], &mUsartReceivePack, pack_cmd-2); |
| | | } |
| | | break; |
| | | |
| | | } |
| | | } |