forked from liuning587/QGDW1376_2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGDW1376_2.h
68 lines (57 loc) · 2.25 KB
/
GDW1376_2.h
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/**
******************************************************************************
* @file GDW1376_2.h
* @brief API include file of GDW1376_2.h.
* @details This file including all API functions's declare of GDW1376_2.h.
* @copyright
******************************************************************************
*/
#ifndef GDW1376_2_H_
#define GDW1376_2_H_
#ifdef __cplusplus
extern "C"
{
#endif
/*-----------------------------------------------------------------------------
Section: Includes
----------------------------------------------------------------------------*/
/* NONE */
/*-----------------------------------------------------------------------------
Section: Macro Definitions
----------------------------------------------------------------------------*/
#define ERR_NONE (0) /**< 无错误 */
#define ERR_INPUT (1) /**< 输入参数错误 */
#define ERR_CHKFRM_0x68 (2) /**< 报文头0x68 */
#define ERR_CHKFRM_LEN (3) /**< 输入报文长度无效 */
#define ERR_CHKFRM_0x16 (4) /**< 报文尾0x16 */
#define ERR_CHKFRM_cs (5) /**< 报文cs错误 */
#define ERR_AFN_FN (6) /**< 不支持的FN*/
#define ERR_APP_LEN (7) /**< 应用数据LEN有误 */
/*-----------------------------------------------------------------------------
Section: Type Definitions
----------------------------------------------------------------------------*/
typedef void (*pcallback)(const char*);
/*-----------------------------------------------------------------------------
Section: Globals
----------------------------------------------------------------------------*/
/* NONE */
/*-----------------------------------------------------------------------------
Section: Function Prototypes
----------------------------------------------------------------------------*/
extern int
GDW1376_2_parse(const unsigned char *pin,
unsigned int len,
pcallback pcb,
const char *pline_head,
const char *pline_end);
extern const char *
GDW1376_2_error(int errid);
extern const char *
GDW1376_2_ver_str(void);
extern const char *
GDW1376_2_changelog(void);
#ifdef __cplusplus
}
#endif
#endif /* GDW1376_2_H_ */
/*--------------------------End of GDW1376_2.h-----------------------------*/