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: wifi_hotspot_config.h 的头文件 15 */ 16 17 18 #ifndef SERVICE_WIFI_HOTSPOT_CONFIG_C_H 19 #define SERVICE_WIFI_HOTSPOT_CONFIG_C_H 20 21 #include "wifi_device_config.h" 22 23 #ifdef __cplusplus 24 #if __cplusplus 25 extern "C" { 26 #endif 27 #endif 28 29 /** 30 * @defgroup middleware_service_wifi_hotspot_config WiFi Hotspot Config 31 * @ingroup middleware_service_wifi 32 * @{ 33 */ 34 35 /** 36 * @if Eng 37 * @brief Config of hot spot. 38 * @else 39 * @brief Hotspot的配置。 40 * @endif 41 */ 42 typedef struct { 43 int8_t ssid[WIFI_MAX_SSID_LEN]; /*!< @if Eng Service set ID (SSID). 44 @else SSID。 @endif */ 45 int8_t pre_shared_key[WIFI_MAX_KEY_LEN]; /*!< @if Eng Pre Shared Key(PSK). 46 @else 预共享秘钥。 @endif */ 47 int8_t reserved[2]; 48 wifi_security_enum security_type; /*!< @if Eng Security Type. 49 @else 安全类型。 @endif */ 50 int32_t channel_num; /*!< @if Eng Channel number. 51 @else 信道号。 @endif */ 52 int32_t wifi_psk_type; /*!< @if Eng Type of PSK. 53 @else PSK的类型。 @endif */ 54 } softap_config_stru; 55 56 57 /** 58 * @if Eng 59 * @brief Extended configuration of SoftAP. 60 * @else 61 * @brief SoftAP的扩展配置。 62 * @endif 63 */ 64 typedef struct { 65 uint32_t beacon_interval; /*!< @if Eng beacon_interval, range(25ms~1000ms), default(100ms), 66 0 means not configured. 67 @else beaconInterval, 范围25ms~1000ms, 默认100ms, 0表示未配置。 @endif */ 68 uint32_t dtim_period; /*!< @if Eng dtim_period, range(1~30), default(2), 0 means not configured. 69 @else dtimPeriod, 范围1~30, 默认2,0表示未配置。 @endif */ 70 uint32_t group_rekey; /*!< @if Eng group_rekey, range(30s~86400s), default(86400s), 71 0 means not configured. 72 @else config->groupRekey, 范围30s~86400s, 默认86400s,0表示未配置。 @endif */ 73 uint32_t hidden_ssid_flag; /*!< @if Eng hidden_ssid_flag, not hidden:1, hidden: 2. 74 The default value is not hidden, 0 means not configured. 75 @else hiddenSsidFlag, 不隐藏:1,隐藏:2。默认配置为不隐藏,0表示未配置。 @endif */ 76 uint32_t gi; /*!< @if Eng gi,The default value is auto_GI.0, 77 indicating that this parameter is not configured. 78 If a non-zero valid value is configured, 79 a valid protocol mode must also be configured. 80 This function is not supported currently and 81 will be supported in the future. 82 @else config->Gi, 默认是auto_GI.0表示未配置。进行非0有效值配置时, 83 需要同时配置有效的协议模式。当前暂不支持,后续支持。 @endif */ 84 protocol_mode_enum protocol_mode; /*!< @if Eng protocol_mode_enum mode.By default, this parameter is configured 85 based on the maximum protocol capability of the chip. 86 0: not configured. 87 @else 协议模式,默认按照芯片最大协议能力进行配置,0表示未配置。 @endif */ 88 } softap_config_advance_stru; 89 90 /** 91 * @} 92 */ 93 94 #ifdef __cplusplus 95 #if __cplusplus 96 } 97 #endif 98 #endif 99 100 #endif // SERVICE_WIFI_HOTSPOT_CONFIG_C_H 101