1 /*\r
2 * mtParser.h\r
3 *\r
4 * This module contains the API for the ZigBee SoC Host Interface.\r
5 *\r
6 * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/\r
7 *\r
8 *\r
9 * Redistribution and use in source and binary forms, with or without\r
10 * modification, are permitted provided that the following conditions\r
11 * are met:\r
12 *\r
13 * Redistributions of source code must retain the above copyright\r
14 * notice, this list of conditions and the following disclaimer.\r
15 *\r
16 * Redistributions in binary form must reproduce the above copyright\r
17 * notice, this list of conditions and the following disclaimer in the\r
18 * documentation and/or other materials provided with the\r
19 * distribution.\r
20 *\r
21 * Neither the name of Texas Instruments Incorporated nor the names of\r
22 * its contributors may be used to endorse or promote products derived\r
23 * from this software without specific prior written permission.\r
24 *\r
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
26 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
27 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
28 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r
29 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
30 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
31 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
32 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
33 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
35 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
36 *\r
37 */\r
38 #ifndef ZBMTPARSER_H\r
39 #define ZBMTPARSER_H\r
40 \r
41 #ifdef __cplusplus\r
42 extern "C"\r
43 {\r
44 #endif\r
45 \r
46 #include <stdint.h>\r
47 #include "rpc.h"\r
48 \r
49 ////MT SYS Commands\r
50 //#define MT_SYS_RESET_REQ 0x00\r
51 \r
52 #define BUILD_UINT16(loByte, hiByte) \\r
53 ((uint16_t)(((loByte) & 0x00FF) + (((hiByte) & 0x00FF) << 8)))\r
54 \r
55 #define BUILD_UINT32(Byte0, Byte1, Byte2, Byte3) \\r
56 ((uint32_t)((uint32_t)((Byte0) & 0x00FF) \\r
57 + ((uint32_t)((Byte1) & 0x00FF) << 8) \\r
58 + ((uint32_t)((Byte2) & 0x00FF) << 16) \\r
59 + ((uint32_t)((Byte3) & 0x00FF) << 24)))\r
60 \r
61 void zbSendMtFrame(uint8_t cmd0, uint8_t cmd1, uint8_t * payload, uint8_t payload_len);\r
62 void mtProcess(uint8_t *rpcBuff, uint8_t rpcLen);\r
63 \r
64 #ifdef __cplusplus\r
65 }\r
66 #endif\r
67 \r
68 #endif /* ZBMTPARSER_H */\r