1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
| #ifndef __AT_CMD_H__
| #define __AT_CMD_H__
|
| #include "stdint.h"
|
| #define MAX_FRAME_LEN 50
| #define CMD_READ 1
| #define CMD_WRITE 2
| #define CMD_REPLY 3
| typedef enum{ UsartReceiveWaitHead0,// 55 0d
| UsartReceiveWaitHead1,//aa 0a
| UsartReceiveWaitMsgType,//
| UsartReceiveWaitLength, //
| UsartReceiveWaitCMD,
| UsartReceiveWaitIndex,
| UsartReceiveWaitDataLen,
| UsartReceiveWaitData,
| UsartReceiveWaitChecksum//
| }UsartRecvPackState;
| extern uint8_t mUsartReceivePack[100];
| extern uint8_t mUsart2ReceivePack[100];
|
| void UsartParseDataHandler(uint8_t data);
|
| void Usart2ParseDataHandler(uint8_t data);
|
|
| #endif
|
|