1 /* 2 * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 * Description: AT internal interface. 15 */ 16 17 #ifndef __AT_H__ 18 #define __AT_H__ 19 20 #include <td_base.h> 21 22 #ifdef __cplusplus 23 #if __cplusplus 24 extern "C" { 25 #endif 26 #endif 27 #ifdef _PRE_WLAN_FEATURE_MFG_TEST 28 #define EXT_AT_MACSTR "%02x:%02x:%02x:%02x:%02x:%02x" 29 #define ext_at_mac2str(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5] 30 #else 31 #define EXT_AT_MACSTR "%02x:%02x:%02x:%02x:**:**" 32 #define ext_at_mac2str(a) (a)[0], (a)[1], (a)[2], (a)[3] 33 #endif 34 35 td_u32 at_cmd_process(TD_CONST td_u8 *at_cmd_line); 36 td_u32 at_param_null_check(td_s32 argc, TD_CONST td_char **argv); 37 td_u32 integer_check(TD_CONST td_char *val); 38 td_u32 alnum_check(TD_CONST td_char *val); 39 td_u32 cmd_strtoaddr(TD_CONST td_char *param, td_uchar *mac_addr, td_u32 addr_len); 40 char *at_parse_string(TD_CONST char *value, td_u32 *len); 41 int at_proc_task_body(td_void *param); 42 43 td_void at_help_cmd_register(td_void); 44 td_s32 convert_bin_to_dec(td_s32 pbin); 45 td_void at_str_to_hex(TD_CONST td_char *param, td_u32 len, unsigned char *value); 46 47 #ifdef __cplusplus 48 #if __cplusplus 49 } 50 #endif 51 #endif 52 53 #endif 54