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. \n 14 * 15 * Description: Provides at product config header \n 16 * Author: 17 * History: \n 18 * 2022-09-02, Create file. \n 19 */ 20 21 #ifndef AT_CONFIG_H 22 #define AT_CONFIG_H 23 24 #include <stdint.h> 25 #include <stddef.h> 26 #include <stdbool.h> 27 #include <stdlib.h> 28 #include <assert.h> 29 #include "securec.h" 30 #include "soc_osal.h" 31 #include "common_def.h" 32 #include "errcode.h" 33 34 #ifdef __cplusplus 35 #if __cplusplus 36 extern "C" { 37 #endif /* __cplusplus */ 38 #endif /* __cplusplus */ 39 40 /** 41 * @defgroup middleware_chips_at_config Config 42 * @ingroup middleware_chips_at 43 * @{ 44 */ 45 46 /** 47 * @if Eng 48 * @brief Definition maximum length of AT command name.Determined by the product. 49 * @else 50 * @brief 定义AT命令名称的最大长度,由产品定义。 51 * @endif 52 */ 53 #define AT_CMD_NAME_MAX_LENGTH 32 54 55 /** 56 * @if Eng 57 * @brief Definition maximum length of AT command.Determined by the product. 58 * @else 59 * @brief 定义AT命令的最大长度,由产品定义。 60 * @endif 61 */ 62 #define AT_CMD_MAX_LENGTH 4160 63 64 /** 65 * @if Eng 66 * @brief Definition timeout of AT command.Determined by the product. 67 * @else 68 * @brief 定义AT命令的超时时间,由产品定义。 69 * @endif 70 */ 71 #define AT_MAX_TIME_OUT 150 72 73 /** 74 * @if Eng 75 * @brief Definition maximum length of AT command message queue.Determined by the product. 76 * @else 77 * @brief 定义AT命令消息队列最大长度,由产品定义。 78 * @endif 79 */ 80 #define AT_MSG_MAX_NUM 10 81 82 #ifdef CONFIG_AT_SUPPORT_CMD_TABLE_CHECK 83 #define AT_PARA_MAX_NUM 32 84 #endif 85 86 /** 87 * @if Eng 88 * @brief Definition AT command channel number.Determined by the product. 89 * @note Each channel number will occupy 16 bytes of resources. 90 * @else 91 * @brief 定义AT命令通道号,由产品定义。 92 * @note 每个通道号都会占用16字节资源。 93 * @endif 94 */ 95 typedef enum { 96 AT_UART_PORT = 0x00, 97 #ifdef CONFIG_AT_SUPPORT_ZDIAG 98 AT_ZDIAG_PORT = 0x01, 99 #endif 100 AT_MAX_PORT_NUMBER 101 } at_channel_id_t; 102 103 /** 104 * @} 105 */ 106 #ifdef __cplusplus 107 #if __cplusplus 108 } 109 #endif /* __cplusplus */ 110 #endif /* __cplusplus */ 111 112 #endif