WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
at_wifi_mfg_cmd_talbe.h
浏览该文件的文档.
1/*
2 * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2019-2020. All rights reserved.
3 * Description: struction of AT command and public function
4 */
5
6#if ! defined (AT_WIFI_MFG_CMD_TALBE_H)
7#define AT_WIFI_MFG_CMD_TALBE_H
8#ifdef _PRE_WLAN_FEATURE_MFG_TEST
9
10#include "at.h"
11#include "td_base.h"
12typedef struct {
13 uint32_t para_map;
14 const uint8_t *para1; /* Length: 32 */
15 const uint8_t *para2; /* Optional. Length: 32 */
16} calipower_args_t;
17
18typedef struct {
19 uint32_t para_map;
20 const uint8_t *para1; /* Length: 30 */
21} coarse_args_t;
22
23typedef struct {
24 uint32_t para_map;
25} efusepower_args_t;
26
27typedef struct {
28 uint32_t para_map;
29 const uint8_t *para1; /* Length: 32 */
30 const uint8_t *para2; /* Length: 32 */
31 const uint8_t *para3; /* Length: 32 */
32} efuserssi_args_t;
33
34typedef struct {
35 uint32_t para_map;
36} rcaldata_args_t;
37
38typedef struct {
39 uint32_t para_map;
40 const uint8_t *para1; /* Length: 32 */
41} efusetemp_args_t;
42
43typedef struct {
44 uint32_t para_map;
45} efusexotrim_args_t;
46
47typedef struct {
48 uint32_t para_map;
49 const uint8_t *para1; /* Length: 32 */
50 const uint8_t *para2; /* Optional. Length: 32 */
51 const uint8_t *para3; /* Optional. Length: 32 */
52 const uint8_t *para4; /* Optional. Length: 32 */
53} factor_args_t;
54
55typedef struct {
56 uint32_t para_map;
57 const uint8_t *para1; /* Length: 30 */
58} fine_args_t;
59
60typedef struct {
61 uint32_t para_map;
62 const uint8_t *para1; /* Length: 32 */
63} getrssicomp_args_t;
64
65typedef struct {
66 uint32_t para_map;
67 const uint8_t *para1; /* Length: 32 */
68 const uint8_t *para2; /* Optional. Length: 32 */
69 const uint8_t *para3; /* Optional. Length: 32 */
70 const uint8_t *para4; /* Optional. Length: 32 */
71 const uint8_t *para5; /* Optional. Length: 32 */
72 const uint8_t *para6; /* Optional. Length: 32 */
73 const uint8_t *para7; /* Optional. Length: 32 */
74 const uint8_t *para8; /* Optional. Length: 32 */
75 const uint8_t *para9; /* Optional. Length: 32 */
76 const uint8_t *para10; /* Optional. Length: 32 */
77} highcurve_args_t;
78
79typedef struct {
80 uint32_t para_map;
81 const uint8_t *para1; /* Length: 32 */
82 const uint8_t *para2; /* Optional. Length: 32 */
83 const uint8_t *para3; /* Optional. Length: 32 */
84 const uint8_t *para4; /* Optional. Length: 32 */
85 const uint8_t *para5; /* Optional. Length: 32 */
86 const uint8_t *para6; /* Optional. Length: 32 */
87 const uint8_t *para7; /* Optional. Length: 32 */
88 const uint8_t *para8; /* Optional. Length: 32 */
89 const uint8_t *para9; /* Optional. Length: 32 */
90 const uint8_t *para10; /* Optional. Length: 32 */
91} lowcurve_args_t;
92
93typedef struct {
94 uint32_t para_map;
95 const uint8_t *para1; /* Length: 32 */
96} remain_args_t;
97
98typedef struct {
99 uint32_t para_map;
100 const uint8_t *para1; /* Length: 32 */
101 const uint8_t *para2; /* Length: 32 */
102} rssicomp_args_t;
103
104typedef struct {
105 uint32_t para_map;
106 const uint8_t *para1; /* Length: 32 */
107 const uint8_t *para2; /* Optional. Length: 32 */
108} tarpower_args_t;
109
110typedef struct {
111 uint32_t para_map;
112} temp_args_t;
113
114typedef struct {
115 uint32_t para_map;
116} xotrime_args_t;
117
118typedef union {
119 calipower_args_t calipower;
120 coarse_args_t coarse;
121 efusepower_args_t efusepower;
122 efuserssi_args_t efuserssi;
123 rcaldata_args_t rcaldata;
124 efusetemp_args_t efusetemp;
125 efusexotrim_args_t efusexotrim;
126 factor_args_t factor;
127 fine_args_t fine;
128 getrssicomp_args_t getrssicomp;
129 highcurve_args_t highcurve;
130 lowcurve_args_t lowcurve;
131 remain_args_t remain;
132 rssicomp_args_t rssicomp;
133 tarpower_args_t tarpower;
134 temp_args_t temp;
135 xotrime_args_t xotrime;
136} at_wifi_args_t;
137
138/* AT Command */
139at_ret_t cmd_set_cali_power(const calipower_args_t *args);
140
141/* AT Command */
142at_ret_t cmd_set_cmu_xo_trim_coarse(const coarse_args_t *args);
143
144/* AT Command */
145at_ret_t cmd_set_efuse_power_info(void);
146at_ret_t cmd_get_efuse_power_info(void);
147
148/* AT Command */
149at_ret_t cmd_set_efuse_rssi_offset(const efuserssi_args_t *args);
150at_ret_t cmd_get_efuse_rssi_offset(void);
151
152/* AT Command */
153at_ret_t cmd_get_rcaldata(void);
154
155/* AT Command */
156at_ret_t cmd_set_efuse_temp(const efusetemp_args_t *args);
157at_ret_t cmd_get_efuse_temp(void);
158
159/* AT Command */
160at_ret_t cmd_set_efuse_cmu_xo_trim(void);
161at_ret_t cmd_get_efuse_cmu_xo_trim(void);
162
163/* AT Command */
164at_ret_t cmd_set_curve_factor(const factor_args_t *args);
165at_ret_t cmd_get_curve_factor(void);
166
167/* AT Command */
168at_ret_t cmd_set_cmu_xo_trim_fine(const fine_args_t *args);
169
170/* AT Command */
171at_ret_t cmd_get_rssi_offset(const getrssicomp_args_t *args);
172
173/* AT Command */
174at_ret_t cmd_set_curve_param(const highcurve_args_t *args);
175at_ret_t cmd_get_curve_param(void);
176
177/* AT Command */
178at_ret_t cmd_set_low_curve_param(const lowcurve_args_t *args);
179at_ret_t cmd_get_low_curve_param(void);
180
181/* AT Command */
182at_ret_t cmd_efuse_remain(const remain_args_t *args);
183
184/* AT Command */
185at_ret_t cmd_set_rssi_offset(const rssicomp_args_t *args);
186
187/* AT Command */
188at_ret_t cmd_set_tar_power(const tarpower_args_t *args);
189
190/* AT Command */
191at_ret_t cmd_get_temp(void);
192
193/* AT Command */
194at_ret_t cmd_get_cmu_xo_trim(void);
195
196const at_para_parse_syntax_t calipower_syntax[] = {
197 {
199 .attribute = AT_SYNTAX_ATTR_MAX_LENGTH,
200 .entry.string.max_length = 32,
201 .offset = offsetof(calipower_args_t, para1)
202 },
203 {
204 .type = AT_SYNTAX_TYPE_STRING,
205 .last = true,
207 .entry.string.max_length = 32,
208 .offset = offsetof(calipower_args_t, para2)
209 },
210};
211
212const at_para_parse_syntax_t coarse_syntax[] = {
213 {
215 .last = true,
216 .attribute = AT_SYNTAX_ATTR_MAX_LENGTH,
217 .entry.string.max_length = 30,
218 .offset = offsetof(coarse_args_t, para1)
219 },
220};
221
222const at_para_parse_syntax_t efuserssi_syntax[] = {
223 {
225 .attribute = AT_SYNTAX_ATTR_MAX_LENGTH,
226 .entry.string.max_length = 32,
227 .offset = offsetof(efuserssi_args_t, para1)
228 },
229 {
230 .type = AT_SYNTAX_TYPE_STRING,
231 .attribute = AT_SYNTAX_ATTR_MAX_LENGTH,
232 .entry.string.max_length = 32,
233 .offset = offsetof(efuserssi_args_t, para2)
234 },
235 {
236 .type = AT_SYNTAX_TYPE_STRING,
237 .last = true,
238 .attribute = AT_SYNTAX_ATTR_MAX_LENGTH,
239 .entry.string.max_length = 32,
240 .offset = offsetof(efuserssi_args_t, para3)
241 },
242};
243
244const at_para_parse_syntax_t efusetemp_syntax[] = {
245 {
247 .last = true,
248 .attribute = AT_SYNTAX_ATTR_MAX_LENGTH,
249 .entry.string.max_length = 32,
250 .offset = offsetof(efusetemp_args_t, para1)
251 },
252};
253
254const at_para_parse_syntax_t factor_syntax[] = {
255 {
257 .attribute = AT_SYNTAX_ATTR_MAX_LENGTH,
258 .entry.string.max_length = 32,
259 .offset = offsetof(factor_args_t, para1)
260 },
261 {
262 .type = AT_SYNTAX_TYPE_STRING,
264 .entry.string.max_length = 32,
265 .offset = offsetof(factor_args_t, para2)
266 },
267 {
268 .type = AT_SYNTAX_TYPE_STRING,
270 .entry.string.max_length = 32,
271 .offset = offsetof(factor_args_t, para3)
272 },
273 {
274 .type = AT_SYNTAX_TYPE_STRING,
275 .last = true,
277 .entry.string.max_length = 32,
278 .offset = offsetof(factor_args_t, para4)
279 },
280};
281
282const at_para_parse_syntax_t fine_syntax[] = {
283 {
285 .last = true,
286 .attribute = AT_SYNTAX_ATTR_MAX_LENGTH,
287 .entry.string.max_length = 30,
288 .offset = offsetof(fine_args_t, para1)
289 },
290};
291
292const at_para_parse_syntax_t getrssicomp_syntax[] = {
293 {
295 .last = true,
296 .attribute = AT_SYNTAX_ATTR_MAX_LENGTH,
297 .entry.string.max_length = 32,
298 .offset = offsetof(getrssicomp_args_t, para1)
299 },
300};
301
302const at_para_parse_syntax_t highcurve_syntax[] = {
303 {
305 .attribute = AT_SYNTAX_ATTR_MAX_LENGTH,
306 .entry.string.max_length = 32,
307 .offset = offsetof(highcurve_args_t, para1)
308 },
309 {
310 .type = AT_SYNTAX_TYPE_STRING,
312 .entry.string.max_length = 32,
313 .offset = offsetof(highcurve_args_t, para2)
314 },
315 {
316 .type = AT_SYNTAX_TYPE_STRING,
318 .entry.string.max_length = 32,
319 .offset = offsetof(highcurve_args_t, para3)
320 },
321 {
322 .type = AT_SYNTAX_TYPE_STRING,
324 .entry.string.max_length = 32,
325 .offset = offsetof(highcurve_args_t, para4)
326 },
327 {
328 .type = AT_SYNTAX_TYPE_STRING,
330 .entry.string.max_length = 32,
331 .offset = offsetof(highcurve_args_t, para5)
332 },
333 {
334 .type = AT_SYNTAX_TYPE_STRING,
336 .entry.string.max_length = 32,
337 .offset = offsetof(highcurve_args_t, para6)
338 },
339 {
340 .type = AT_SYNTAX_TYPE_STRING,
342 .entry.string.max_length = 32,
343 .offset = offsetof(highcurve_args_t, para7)
344 },
345 {
346 .type = AT_SYNTAX_TYPE_STRING,
348 .entry.string.max_length = 32,
349 .offset = offsetof(highcurve_args_t, para8)
350 },
351 {
352 .type = AT_SYNTAX_TYPE_STRING,
354 .entry.string.max_length = 32,
355 .offset = offsetof(highcurve_args_t, para9)
356 },
357 {
358 .type = AT_SYNTAX_TYPE_STRING,
359 .last = true,
361 .entry.string.max_length = 32,
362 .offset = offsetof(highcurve_args_t, para10)
363 },
364};
365
366const at_para_parse_syntax_t lowcurve_syntax[] = {
367 {
369 .attribute = AT_SYNTAX_ATTR_MAX_LENGTH,
370 .entry.string.max_length = 32,
371 .offset = offsetof(lowcurve_args_t, para1)
372 },
373 {
374 .type = AT_SYNTAX_TYPE_STRING,
376 .entry.string.max_length = 32,
377 .offset = offsetof(lowcurve_args_t, para2)
378 },
379 {
380 .type = AT_SYNTAX_TYPE_STRING,
382 .entry.string.max_length = 32,
383 .offset = offsetof(lowcurve_args_t, para3)
384 },
385 {
386 .type = AT_SYNTAX_TYPE_STRING,
388 .entry.string.max_length = 32,
389 .offset = offsetof(lowcurve_args_t, para4)
390 },
391 {
392 .type = AT_SYNTAX_TYPE_STRING,
394 .entry.string.max_length = 32,
395 .offset = offsetof(lowcurve_args_t, para5)
396 },
397 {
398 .type = AT_SYNTAX_TYPE_STRING,
400 .entry.string.max_length = 32,
401 .offset = offsetof(lowcurve_args_t, para6)
402 },
403 {
404 .type = AT_SYNTAX_TYPE_STRING,
406 .entry.string.max_length = 32,
407 .offset = offsetof(lowcurve_args_t, para7)
408 },
409 {
410 .type = AT_SYNTAX_TYPE_STRING,
412 .entry.string.max_length = 32,
413 .offset = offsetof(lowcurve_args_t, para8)
414 },
415 {
416 .type = AT_SYNTAX_TYPE_STRING,
418 .entry.string.max_length = 32,
419 .offset = offsetof(lowcurve_args_t, para9)
420 },
421 {
422 .type = AT_SYNTAX_TYPE_STRING,
423 .last = true,
425 .entry.string.max_length = 32,
426 .offset = offsetof(lowcurve_args_t, para10)
427 },
428};
429
430const at_para_parse_syntax_t remain_syntax[] = {
431 {
433 .last = true,
434 .attribute = AT_SYNTAX_ATTR_MAX_LENGTH,
435 .entry.string.max_length = 32,
436 .offset = offsetof(remain_args_t, para1)
437 },
438};
439
440const at_para_parse_syntax_t rssicomp_syntax[] = {
441 {
443 .attribute = AT_SYNTAX_ATTR_MAX_LENGTH,
444 .entry.string.max_length = 32,
445 .offset = offsetof(rssicomp_args_t, para1)
446 },
447 {
448 .type = AT_SYNTAX_TYPE_STRING,
449 .last = true,
450 .attribute = AT_SYNTAX_ATTR_MAX_LENGTH,
451 .entry.string.max_length = 32,
452 .offset = offsetof(rssicomp_args_t, para2)
453 },
454};
455
456const at_para_parse_syntax_t tarpower_syntax[] = {
457 {
459 .attribute = AT_SYNTAX_ATTR_MAX_LENGTH,
460 .entry.string.max_length = 32,
461 .offset = offsetof(tarpower_args_t, para1)
462 },
463 {
464 .type = AT_SYNTAX_TYPE_STRING,
465 .last = true,
467 .entry.string.max_length = 32,
468 .offset = offsetof(tarpower_args_t, para2)
469 },
470};
471
472const at_cmd_entry_t at_wifi_mfg_cmd_parse_table[] = {
473 {
474 "CALIPOWER",
475 10,
476 0,
477 calipower_syntax,
478 NULL,
479 (at_set_func_t)cmd_set_cali_power,
480 NULL,
481 NULL,
482 },
483 {
484 "COARSE",
485 7,
486 0,
487 coarse_syntax,
488 NULL,
489 (at_set_func_t)cmd_set_cmu_xo_trim_coarse,
490 NULL,
491 NULL,
492 },
493 {
494 "EFUSEPOWER",
495 11,
496 0,
497 NULL,
498 cmd_set_efuse_power_info,
500 cmd_get_efuse_power_info,
501 NULL,
502 },
503 {
504 "EFUSERSSI",
505 10,
506 0,
507 efuserssi_syntax,
508 NULL,
509 (at_set_func_t)cmd_set_efuse_rssi_offset,
510 cmd_get_efuse_rssi_offset,
511 NULL,
512 },
513 {
514 "RCALDATA",
515 12,
516 0,
517 NULL,
518 cmd_get_rcaldata,
520 NULL,
521 NULL,
522 },
523 {
524 "EFUSETEMP",
525 10,
526 0,
527 efusetemp_syntax,
528 NULL,
529 (at_set_func_t)cmd_set_efuse_temp,
530 cmd_get_efuse_temp,
531 NULL,
532 },
533 {
534 "EFUSEXOTRIM",
535 12,
536 0,
537 NULL,
538 cmd_set_efuse_cmu_xo_trim,
540 cmd_get_efuse_cmu_xo_trim,
541 NULL,
542 },
543 {
544 "FACTOR",
545 7,
546 0,
547 factor_syntax,
548 NULL,
549 (at_set_func_t)cmd_set_curve_factor,
550 cmd_get_curve_factor,
551 NULL,
552 },
553 {
554 "FINE",
555 5,
556 0,
557 fine_syntax,
558 NULL,
559 (at_set_func_t)cmd_set_cmu_xo_trim_fine,
560 NULL,
561 NULL,
562 },
563 {
564 "GETRSSICOMP",
565 12,
566 0,
567 getrssicomp_syntax,
568 NULL,
569 (at_set_func_t)cmd_get_rssi_offset,
570 NULL,
571 NULL,
572 },
573 {
574 "HIGHCURVE",
575 10,
576 0,
577 highcurve_syntax,
578 NULL,
579 (at_set_func_t)cmd_set_curve_param,
580 cmd_get_curve_param,
581 NULL,
582 },
583 {
584 "LOWCURVE",
585 9,
586 0,
587 lowcurve_syntax,
588 NULL,
589 (at_set_func_t)cmd_set_low_curve_param,
590 cmd_get_low_curve_param,
591 NULL,
592 },
593 {
594 "REMAIN",
595 10,
596 0,
597 remain_syntax,
598 NULL,
599 (at_set_func_t)cmd_efuse_remain,
600 NULL,
601 NULL,
602 },
603 {
604 "RSSICOMP",
605 9,
606 0,
607 rssicomp_syntax,
608 NULL,
609 (at_set_func_t)cmd_set_rssi_offset,
610 NULL,
611 NULL,
612 },
613 {
614 "TARPOWER",
615 9,
616 0,
617 tarpower_syntax,
618 NULL,
619 (at_set_func_t)cmd_set_tar_power,
620 NULL,
621 NULL,
622 },
623 {
624 "TEMP",
625 5,
626 0,
627 NULL,
628 cmd_get_temp,
630 NULL,
631 NULL,
632 },
633 {
634 "XOTRIME",
635 8,
636 0,
637 NULL,
638 NULL,
640 cmd_get_cmu_xo_trim,
641 NULL,
642 },
643};
644
645#endif
646#endif /* AT_WIFI_MFG_CMD_TALBE_H */
647
#define NULL
Definition common_def.h:21
#define offsetof(type, member)
Definition list.h:66
at_ret_t(* at_set_func_t)(const void *arg)
声明AT命令设置函数类型。
Definition at.h:133
at_ret_t
定义AT错误码。
Definition at.h:46
@ AT_SYNTAX_ATTR_MAX_LENGTH
Definition at.h:301
@ AT_SYNTAX_ATTR_OPTIONAL
Definition at.h:285
@ AT_SYNTAX_TYPE_STRING
Definition at.h:264
定义AT命令实体。
Definition at.h:346
定义AT命令某个参数校验结构。
Definition at.h:323
uint32_t type
Definition at.h:324