1 // Copyright 2015-2019 Espressif Systems (Shanghai) PTE LTD 2 // 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 15 #ifndef _TCPIP_ADAPTER_COMPAT_H_ 16 #define _TCPIP_ADAPTER_COMPAT_H_ 17 18 #ifdef __cplusplus 19 extern "C" { 20 #endif 21 22 /** 23 * @brief This function is called from ethernet driver init code to facilitate 24 * autostart fo the driver in backward compatible tcpip_adapter way 25 * 26 * @note This api is provided in a separate header, which is included internally only (from wifi driver) 27 * rather then user initialization code. 28 * 29 * @param[in] h Handle to the ethernet driver 30 * 31 * @return ESP_OK on success 32 */ 33 esp_err_t tcpip_adapter_compat_start_eth(void* h); 34 35 /** 36 * @brief This function is called from wifi_init to assure backward compatibility mode 37 * of tcpip_adapter. In case of legacy use, default instances of ap and sta 38 * are created and handlers are registered 39 * 40 * @note This API is provided in a separate header, which is included internally only (from wifi_init) 41 * rather then user initialization code. At this same time this API is also a public API of former tcqpip_adapter 42 * and thus provided also in tcpip_adapter.h 43 * 44 * @return ESP_OK on success 45 */ 46 esp_err_t tcpip_adapter_set_default_wifi_handlers(void); 47 48 /** 49 * @brief This function is called from wifi_init to assure backward compatibility mode 50 * of tcpip_adapter. In case of legacy use, default instances of ap and sta 51 * are destroyed and handlers are unregistered 52 * 53 * @note This API is provided in a separate header, which is included internally only (from wifi_init) 54 * rather then user initialization code. At this same time this API is also a public API of former tcqpip_adapter 55 * and thus provided also in tcpip_adapter.h 56 * 57 * @return ESP_OK on success 58 */ 59 esp_err_t tcpip_adapter_clear_default_wifi_handlers(void); 60 61 #ifdef __cplusplus 62 } // extern "C" 63 #endif 64 65 #endif //_TCPIP_ADAPTER_COMPAT_H_ 66