1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
24
25
26
27
28
29
30
33
34
35
36
45
46
49
50
51
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
/* ... */
/* ... */
#ifndef BTA_AG_AT_H
#define BTA_AG_AT_H
#include "stack/bt_types.h"
#include "common/bt_target.h"
/* ... */
#if (BTA_AG_INCLUDED == TRUE)
#define BTA_AG_AT_NONE 0x01
#define BTA_AG_AT_SET 0x02
#define BTA_AG_AT_READ 0x04
#define BTA_AG_AT_TEST 0x08
#define BTA_AG_AT_FREE 0x10
#define BTA_AG_AT_STR 0
#define BTA_AG_AT_INT 1 7 defines
/* ... */
typedef struct
{
const char *p_cmd;
UINT8 arg_type;
UINT8 fmt;
UINT8 min;
INT16 max;
}{...} tBTA_AG_AT_CMD;
typedef void (tBTA_AG_AT_CMD_CBACK)(void *p_user, UINT16 cmd, UINT8 arg_type,
char *p_arg, INT16 int_arg);
typedef void (tBTA_AG_AT_ERR_CBACK)(void *p_user, BOOLEAN unknown, char *p_arg);
typedef struct
{
tBTA_AG_AT_CMD *p_at_tbl;
tBTA_AG_AT_CMD_CBACK *p_cmd_cback;
tBTA_AG_AT_ERR_CBACK *p_err_cback;
void *p_user;
char *p_cmd_buf;
UINT16 cmd_pos;
UINT16 cmd_max_len;
UINT8 state;
}{...} tBTA_AG_AT_CB;
/* ... */
/* ... */
extern void bta_ag_at_init(tBTA_AG_AT_CB *p_cb);
/* ... */
extern void bta_ag_at_reinit(tBTA_AG_AT_CB *p_cb);
/* ... */
extern void bta_ag_at_parse(tBTA_AG_AT_CB *p_cb, char *p_buf, UINT16 len);
/* ... */
#endif
/* ... */
#endif