wifi.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596
  1. /*
  2. * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. /*
  7. * All the APIs declared here are internal only APIs, it can only be used by
  8. * espressif internal modules, such as SSC, LWIP, TCPIP adapter etc, espressif
  9. * customers are not recommended to use them.
  10. *
  11. * If someone really want to use specified APIs declared in here, please contact
  12. * espressif AE/developer to make sure you know the limitations or risk of
  13. * the API, otherwise you may get unexpected behavior!!!
  14. *
  15. */
  16. #ifndef __ESP_WIFI_INTERNAL_H__
  17. #define __ESP_WIFI_INTERNAL_H__
  18. #include <stdint.h>
  19. #include <stdbool.h>
  20. #include "freertos/FreeRTOS.h"
  21. #include "freertos/queue.h"
  22. #include "sys/queue.h"
  23. #include "esp_err.h"
  24. #include "esp_wifi_types.h"
  25. #include "esp_event.h"
  26. #include "esp_wifi.h"
  27. #include "esp_smartconfig.h"
  28. #include "wifi_types.h"
  29. #ifdef __cplusplus
  30. extern "C" {
  31. #endif
  32. typedef struct {
  33. QueueHandle_t handle; /**< FreeRTOS queue handler */
  34. void *storage; /**< storage for FreeRTOS queue */
  35. } wifi_static_queue_t;
  36. /**
  37. * @brief WiFi log level
  38. *
  39. */
  40. typedef enum {
  41. WIFI_LOG_NONE = 0,
  42. WIFI_LOG_ERROR , /*enabled by default*/
  43. WIFI_LOG_WARNING, /*enabled by default*/
  44. WIFI_LOG_INFO, /*enabled by default*/
  45. WIFI_LOG_DEBUG, /*can be set in menuconfig*/
  46. WIFI_LOG_VERBOSE, /*can be set in menuconfig*/
  47. } wifi_log_level_t;
  48. /**
  49. * @brief WiFi log module definition
  50. *
  51. */
  52. typedef enum {
  53. WIFI_LOG_MODULE_ALL = 0, /*all log modules */
  54. WIFI_LOG_MODULE_WIFI, /*logs related to WiFi*/
  55. WIFI_LOG_MODULE_COEX, /*logs related to WiFi and BT(or BLE) coexist*/
  56. WIFI_LOG_MODULE_MESH, /*logs related to Mesh*/
  57. } wifi_log_module_t;
  58. /**
  59. * @brief WiFi log submodule definition
  60. *
  61. */
  62. #define WIFI_LOG_SUBMODULE_ALL (0) /*all log submodules*/
  63. #define WIFI_LOG_SUBMODULE_INIT (1) /*logs related to initialization*/
  64. #define WIFI_LOG_SUBMODULE_IOCTL (1<<1) /*logs related to API calling*/
  65. #define WIFI_LOG_SUBMODULE_CONN (1<<2) /*logs related to connecting*/
  66. #define WIFI_LOG_SUBMODULE_SCAN (1<<3) /*logs related to scaning*/
  67. /**
  68. * @brief Initialize Wi-Fi Driver
  69. * Alloc resource for WiFi driver, such as WiFi control structure, RX/TX buffer,
  70. * WiFi NVS structure among others.
  71. *
  72. * For the most part, you need not call this function directly. It gets called
  73. * from esp_wifi_init().
  74. *
  75. * This function may be called, if you only need to initialize the Wi-Fi driver
  76. * without having to use the network stack on top.
  77. *
  78. * @param config provide WiFi init configuration
  79. *
  80. * @return
  81. * - ESP_OK: succeed
  82. * - ESP_ERR_NO_MEM: out of memory
  83. * - others: refer to error code esp_err.h
  84. */
  85. esp_err_t esp_wifi_init_internal(const wifi_init_config_t *config);
  86. /**
  87. * @brief Deinitialize Wi-Fi Driver
  88. * Free resource for WiFi driver, such as WiFi control structure, RX/TX buffer,
  89. * WiFi NVS structure among others.
  90. *
  91. * For the most part, you need not call this function directly. It gets called
  92. * from esp_wifi_deinit().
  93. *
  94. * This function may be called, if you call esp_wifi_init_internal to initialize
  95. * WiFi driver.
  96. *
  97. * @return
  98. * - ESP_OK: succeed
  99. * - others: refer to error code esp_err.h
  100. */
  101. esp_err_t esp_wifi_deinit_internal(void);
  102. /**
  103. * @brief free the rx buffer which allocated by wifi driver
  104. *
  105. * @param void* buffer: rx buffer pointer
  106. */
  107. void esp_wifi_internal_free_rx_buffer(void* buffer);
  108. /**
  109. * @brief transmit the buffer via wifi driver
  110. *
  111. * This API makes a copy of the input buffer and then forwards the buffer
  112. * copy to WiFi driver.
  113. *
  114. * @param wifi_interface_t wifi_if : wifi interface id
  115. * @param void *buffer : the buffer to be tansmit
  116. * @param uint16_t len : the length of buffer
  117. *
  118. * @return
  119. * - ESP_OK : Successfully transmit the buffer to wifi driver
  120. * - ESP_ERR_NO_MEM: out of memory
  121. * - ESP_ERR_WIFI_ARG: invalid argument
  122. * - ESP_ERR_WIFI_IF : WiFi interface is invalid
  123. * - ESP_ERR_WIFI_CONN : WiFi interface is not created, e.g. send the data to STA while WiFi mode is AP mode
  124. * - ESP_ERR_WIFI_NOT_STARTED : WiFi is not started
  125. * - ESP_ERR_WIFI_STATE : WiFi internal state is not ready, e.g. WiFi is not started
  126. * - ESP_ERR_WIFI_NOT_ASSOC : WiFi is not associated
  127. * - ESP_ERR_WIFI_TX_DISALLOW : WiFi TX is disallowed, e.g. WiFi hasn't pass the authentication
  128. * - ESP_ERR_WIFI_POST : caller fails to post event to WiFi task
  129. */
  130. int esp_wifi_internal_tx(wifi_interface_t wifi_if, void *buffer, uint16_t len);
  131. /**
  132. * @brief The net stack buffer reference counter callback function
  133. *
  134. */
  135. typedef void (*wifi_netstack_buf_ref_cb_t)(void *netstack_buf);
  136. /**
  137. * @brief The net stack buffer free callback function
  138. *
  139. */
  140. typedef void (*wifi_netstack_buf_free_cb_t)(void *netstack_buf);
  141. /**
  142. * @brief transmit the buffer by reference via wifi driver
  143. *
  144. * This API firstly increases the reference counter of the input buffer and
  145. * then forwards the buffer to WiFi driver. The WiFi driver will free the buffer
  146. * after processing it. Use esp_wifi_internal_tx() if the uplayer buffer doesn't
  147. * supports reference counter.
  148. *
  149. * @param wifi_if : wifi interface id
  150. * @param buffer : the buffer to be tansmit
  151. * @param len : the length of buffer
  152. * @param netstack_buf : the netstack buffer related to bufffer
  153. *
  154. * @return
  155. * - ESP_OK : Successfully transmit the buffer to wifi driver
  156. * - ESP_ERR_NO_MEM: out of memory
  157. * - ESP_ERR_WIFI_ARG: invalid argument
  158. * - ESP_ERR_WIFI_IF : WiFi interface is invalid
  159. * - ESP_ERR_WIFI_CONN : WiFi interface is not created, e.g. send the data to STA while WiFi mode is AP mode
  160. * - ESP_ERR_WIFI_NOT_STARTED : WiFi is not started
  161. * - ESP_ERR_WIFI_STATE : WiFi internal state is not ready, e.g. WiFi is not started
  162. * - ESP_ERR_WIFI_NOT_ASSOC : WiFi is not associated
  163. * - ESP_ERR_WIFI_TX_DISALLOW : WiFi TX is disallowed, e.g. WiFi hasn't pass the authentication
  164. * - ESP_ERR_WIFI_POST : caller fails to post event to WiFi task
  165. */
  166. esp_err_t esp_wifi_internal_tx_by_ref(wifi_interface_t ifx, void *buffer, size_t len, void *netstack_buf);
  167. /**
  168. * @brief Initialize WAPI function when wpa_supplicant initialize.
  169. *
  170. * This API is privately used, be careful not open to external applicantion.
  171. *
  172. * @return
  173. * - ESP_OK : succeed
  174. * - ESP_ERR_WAPI_INTERNAL : Internal error
  175. */
  176. esp_err_t esp_wifi_internal_wapi_init(void);
  177. /**
  178. * @brief De-initialize WAPI function when wpa_supplicant de-initialize.
  179. *
  180. * This API is privately used, be careful not open to external applicantion.
  181. *
  182. * @return
  183. * - ESP_OK : succeed
  184. */
  185. esp_err_t esp_wifi_internal_wapi_deinit(void);
  186. /**
  187. * @brief register the net stack buffer reference increasing and free callback
  188. *
  189. * @param ref : net stack buffer reference callback
  190. * @param free: net stack buffer free callback
  191. *
  192. * @return
  193. * - ESP_OK : Successfully transmit the buffer to wifi driver
  194. * - others : failed to register the callback
  195. */
  196. esp_err_t esp_wifi_internal_reg_netstack_buf_cb(wifi_netstack_buf_ref_cb_t ref, wifi_netstack_buf_free_cb_t free);
  197. /**
  198. * @brief The WiFi RX callback function
  199. *
  200. * Each time the WiFi need to forward the packets to high layer, the callback function will be called
  201. */
  202. typedef esp_err_t (*wifi_rxcb_t)(void *buffer, uint16_t len, void *eb);
  203. /**
  204. * @brief Set the WiFi RX callback
  205. *
  206. * @attention 1. Currently we support only one RX callback for each interface
  207. *
  208. * @param wifi_interface_t ifx : interface
  209. * @param wifi_rxcb_t fn : WiFi RX callback
  210. *
  211. * @return
  212. * - ESP_OK : succeed
  213. * - others : fail
  214. */
  215. esp_err_t esp_wifi_internal_reg_rxcb(wifi_interface_t ifx, wifi_rxcb_t fn);
  216. /**
  217. * @brief Notify WIFI driver that the station got ip successfully
  218. *
  219. * @return
  220. * - ESP_OK : succeed
  221. * - others : fail
  222. */
  223. esp_err_t esp_wifi_internal_set_sta_ip(void);
  224. /**
  225. * @brief enable or disable transmitting WiFi MAC frame with fixed rate
  226. *
  227. * @attention 1. If fixed rate is enabled, both management and data frame are transmitted with fixed rate
  228. * @attention 2. Make sure that the receiver is able to receive the frame with the fixed rate if you want the frame to be received
  229. *
  230. * @param ifx : wifi interface
  231. * @param en : false - disable, true - enable
  232. * @param rate : PHY rate
  233. *
  234. * @return
  235. * - ERR_OK : succeed
  236. * - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
  237. * - ESP_ERR_WIFI_NOT_STARTED: WiFi was not started by esp_wifi_start
  238. * - ESP_ERR_WIFI_IF : invalid WiFi interface
  239. * - ESP_ERR_INVALID_ARG : invalid rate
  240. * - ESP_ERR_NOT_SUPPORTED : do not support to set fixed rate if TX AMPDU is enabled
  241. */
  242. esp_err_t esp_wifi_internal_set_fix_rate(wifi_interface_t ifx, bool en, wifi_phy_rate_t rate);
  243. /**
  244. * @brief Start SmartConfig, config ESP device to connect AP. You need to broadcast information by phone APP.
  245. * Device sniffer special packets from the air that containing SSID and password of target AP.
  246. *
  247. * @attention 1. This API can be called in station or softAP-station mode.
  248. * @attention 2. Can not call esp_smartconfig_start twice before it finish, please call
  249. * esp_smartconfig_stop first.
  250. *
  251. * @param config pointer to smartconfig start configure structure
  252. *
  253. * @return
  254. * - ESP_OK: succeed
  255. * - others: fail
  256. */
  257. esp_err_t esp_smartconfig_internal_start(const smartconfig_start_config_t *config);
  258. /**
  259. * @brief Stop SmartConfig, free the buffer taken by esp_smartconfig_start.
  260. *
  261. * @attention Whether connect to AP succeed or not, this API should be called to free
  262. * memory taken by smartconfig_start.
  263. *
  264. * @return
  265. * - ESP_OK: succeed
  266. * - others: fail
  267. */
  268. esp_err_t esp_smartconfig_internal_stop(void);
  269. /**
  270. * @brief Check the MD5 values of the OS adapter header files in IDF and WiFi library
  271. *
  272. * @attention 1. It is used for internal CI version check
  273. *
  274. * @return
  275. * - ESP_OK : succeed
  276. * - ESP_WIFI_INVALID_ARG : MD5 check fail
  277. */
  278. esp_err_t esp_wifi_internal_osi_funcs_md5_check(const char *md5);
  279. /**
  280. * @brief Check the MD5 values of the crypto types header files in IDF and WiFi library
  281. *
  282. * @attention 1. It is used for internal CI version check
  283. *
  284. * @return
  285. * - ESP_OK : succeed
  286. * - ESP_WIFI_INVALID_ARG : MD5 check fail
  287. */
  288. esp_err_t esp_wifi_internal_crypto_funcs_md5_check(const char *md5);
  289. /**
  290. * @brief Check the MD5 values of the esp_wifi_types.h in IDF and WiFi library
  291. *
  292. * @attention 1. It is used for internal CI version check
  293. *
  294. * @return
  295. * - ESP_OK : succeed
  296. * - ESP_WIFI_INVALID_ARG : MD5 check fail
  297. */
  298. esp_err_t esp_wifi_internal_wifi_type_md5_check(const char *md5);
  299. /**
  300. * @brief Check the MD5 values of the esp_wifi.h in IDF and WiFi library
  301. *
  302. * @attention 1. It is used for internal CI version check
  303. *
  304. * @return
  305. * - ESP_OK : succeed
  306. * - ESP_WIFI_INVALID_ARG : MD5 check fail
  307. */
  308. esp_err_t esp_wifi_internal_esp_wifi_md5_check(const char *md5);
  309. /**
  310. * @brief Allocate a chunk of memory for WiFi driver
  311. *
  312. * @attention This API is not used for DMA memory allocation.
  313. *
  314. * @param size_t size : Size, in bytes, of the amount of memory to allocate
  315. *
  316. * @return A pointer to the memory allocated on success, NULL on failure
  317. */
  318. void *wifi_malloc( size_t size );
  319. /**
  320. * @brief Reallocate a chunk of memory for WiFi driver
  321. *
  322. * @attention This API is not used for DMA memory allocation.
  323. *
  324. * @param void * ptr : Pointer to previously allocated memory, or NULL for a new allocation.
  325. * @param size_t size : Size, in bytes, of the amount of memory to allocate
  326. *
  327. * @return A pointer to the memory allocated on success, NULL on failure
  328. */
  329. void *wifi_realloc( void *ptr, size_t size );
  330. /**
  331. * @brief Callocate memory for WiFi driver
  332. *
  333. * @attention This API is not used for DMA memory allocation.
  334. *
  335. * @param size_t n : Number of continuing chunks of memory to allocate
  336. * @param size_t size : Size, in bytes, of the amount of memory to allocate
  337. *
  338. * @return A pointer to the memory allocated on success, NULL on failure
  339. */
  340. void *wifi_calloc( size_t n, size_t size );
  341. /**
  342. * @brief Update WiFi MAC time
  343. *
  344. * @param uint32_t time_delta : time duration since the WiFi/BT common clock is disabled
  345. *
  346. * @return Always returns ESP_OK
  347. */
  348. typedef esp_err_t (* wifi_mac_time_update_cb_t)( uint32_t time_delta );
  349. /**
  350. * @brief Update WiFi MAC time
  351. *
  352. * @param uint32_t time_delta : time duration since the WiFi/BT common clock is disabled
  353. *
  354. * @return Always returns ESP_OK
  355. */
  356. esp_err_t esp_wifi_internal_update_mac_time( uint32_t time_delta );
  357. /**
  358. * @brief Set current WiFi log level
  359. *
  360. * @param level Log level.
  361. *
  362. * @return
  363. * - ESP_OK: succeed
  364. * - ESP_FAIL: level is invalid
  365. */
  366. esp_err_t esp_wifi_internal_set_log_level(wifi_log_level_t level);
  367. /**
  368. * @brief Set current log module and submodule
  369. *
  370. * @param module Log module
  371. * @param submodule Log submodule
  372. * @param enable enable or disable
  373. * If module == 0 && enable == 0, all log modules are disabled.
  374. * If module == 0 && enable == 1, all log modules are enabled.
  375. * If submodule == 0 && enable == 0, all log submodules are disabled.
  376. * If submodule == 0 && enable == 1, all log submodules are enabled.
  377. *
  378. * @return
  379. * - ESP_OK: succeed
  380. * - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
  381. * - ESP_ERR_WIFI_ARG: invalid argument
  382. */
  383. esp_err_t esp_wifi_internal_set_log_mod(wifi_log_module_t module, uint32_t submodule, bool enable);
  384. /**
  385. * @brief Get current WiFi log info
  386. *
  387. * @param log_level the return log level.
  388. * @param log_mod the return log module and submodule
  389. *
  390. * @return
  391. * - ESP_OK: succeed
  392. */
  393. esp_err_t esp_wifi_internal_get_log(wifi_log_level_t *log_level, uint32_t *log_mod);
  394. /**
  395. * @brief A general API to set/get WiFi internal configuration, it's for debug only
  396. *
  397. * @param cmd : ioctl command type
  398. * @param cfg : configuration for the command
  399. *
  400. * @return
  401. * - ESP_OK: succeed
  402. * - others: failed
  403. */
  404. esp_err_t esp_wifi_internal_ioctl(int cmd, wifi_ioctl_config_t *cfg);
  405. /**
  406. * @brief Get the user-configured channel info
  407. *
  408. * @param ifx : WiFi interface
  409. * @param primary : store the configured primary channel
  410. * @param second : store the configured second channel
  411. *
  412. * @return
  413. * - ESP_OK: succeed
  414. */
  415. esp_err_t esp_wifi_internal_get_config_channel(wifi_interface_t ifx, uint8_t *primary, uint8_t *second);
  416. /**
  417. * @brief Get the negotiated channel info after WiFi connection established
  418. *
  419. * @param ifx : WiFi interface
  420. * @param aid : the connection number when a STA connects to the softAP
  421. * @param primary : store the negotiated primary channel
  422. * @param second : store the negotiated second channel
  423. * @attention the aid param is only works when the ESP32 in softAP/softAP+STA mode
  424. *
  425. * @return
  426. * - ESP_OK: succeed
  427. */
  428. esp_err_t esp_wifi_internal_get_negotiated_channel(wifi_interface_t ifx, uint8_t aid, uint8_t *primary, uint8_t *second);
  429. /**
  430. * @brief Get the negotiated bandwidth info after WiFi connection established
  431. *
  432. * @param ifx : WiFi interface
  433. * @param bw : store the negotiated bandwidth
  434. *
  435. * @return
  436. * - ESP_OK: succeed
  437. */
  438. esp_err_t esp_wifi_internal_get_negotiated_bandwidth(wifi_interface_t ifx, uint8_t aid, uint8_t *bw);
  439. #if SOC_WIFI_HW_TSF
  440. /**
  441. * @brief Check if WiFi TSF is active
  442. *
  443. * @return
  444. * - true: Active
  445. * - false: Not active
  446. */
  447. bool esp_wifi_internal_is_tsf_active(void);
  448. /**
  449. * @brief Update WIFI light sleep wake ahead time
  450. *
  451. */
  452. void esp_wifi_internal_update_light_sleep_wake_ahead_time(uint32_t);
  453. #endif
  454. /**
  455. * @brief Wifi power domain power on
  456. */
  457. void esp_wifi_power_domain_on(void);
  458. /**
  459. * @brief Wifi power domain power off
  460. */
  461. void esp_wifi_power_domain_off(void);
  462. #if CONFIG_MAC_BB_PD
  463. /**
  464. * @brief Enable or disable powering down MAC and baseband when Wi-Fi is sleeping.
  465. *
  466. * @param enable : enable or disable
  467. *
  468. * @return
  469. * - ESP_OK: succeed
  470. */
  471. esp_err_t esp_wifi_internal_set_mac_sleep(bool enable);
  472. /**
  473. * @brief mac bb sleep.
  474. */
  475. void pm_mac_sleep(void);
  476. /**
  477. * @brief mac bb wakeup.
  478. */
  479. void pm_mac_wakeup(void);
  480. #endif
  481. /**
  482. * @breif TxDone callback function type. Should be registered using esp_wifi_set_tx_done_cb()
  483. *
  484. * @param ifidx The interface id that the tx callback has been triggered from
  485. * @param data Pointer to the data transmitted
  486. * @param data_len Length of the data transmitted
  487. * @param txStatus True:if the data was transmitted sucessfully False: if data transmission failed
  488. */
  489. typedef void (* wifi_tx_done_cb_t)(uint8_t ifidx, uint8_t *data, uint16_t *data_len, bool txStatus);
  490. /**
  491. * @brief Register the txDone callback function of type wifi_tx_done_cb_t
  492. *
  493. * @param cb The callback function
  494. *
  495. * @return
  496. * - ESP_OK: succeed
  497. * - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
  498. * - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
  499. */
  500. esp_err_t esp_wifi_set_tx_done_cb(wifi_tx_done_cb_t cb);
  501. /**
  502. * @brief Set device spp amsdu attributes
  503. *
  504. * @param ifx: WiFi interface
  505. * @param spp_cap: spp amsdu capable
  506. * @param spp_req: spp amsdu require
  507. *
  508. * @return
  509. * - ESP_OK: succeed
  510. * - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
  511. * - ESP_ERR_WIFI_IF : invalid WiFi interface
  512. */
  513. esp_err_t esp_wifi_internal_set_spp_amsdu(wifi_interface_t ifidx, bool spp_cap, bool spp_req);
  514. /**
  515. * @brief Update WIFI light sleep default parameters
  516. *
  517. * @param min_freq_mhz: minimum frequency of DFS
  518. * @param max_freq_mhz: maximum frequency of DFS
  519. */
  520. void esp_wifi_internal_update_light_sleep_default_params(int min_freq_mhz, int max_freq_mhz);
  521. /**
  522. * @brief Set the delay time for wifi to enter the sleep state when light sleep
  523. *
  524. * @param return_to_sleep_delay: minimum timeout time for waiting to receive
  525. * data, when no data is received during the timeout period,
  526. * the wifi enters the sleep process.
  527. */
  528. void esp_wifi_set_sleep_delay_time(uint32_t return_to_sleep_delay);
  529. /**
  530. * @brief Set wifi keep alive time
  531. *
  532. * @param keep_alive_time: keep alive time
  533. */
  534. void esp_wifi_set_keep_alive_time(uint32_t keep_alive_time);
  535. #ifdef __cplusplus
  536. }
  537. #endif
  538. #endif /* __ESP_WIFI_H__ */