File tree Expand file tree Collapse file tree 2 files changed +85
-0
lines changed Expand file tree Collapse file tree 2 files changed +85
-0
lines changed Original file line number Diff line number Diff line change 1+ // Copyright 2020-2021 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+ #include "esp_netif.h"
16+
17+ esp_err_t esp_netif_init (void )
18+ {
19+ tcpip_adapter_init ();
20+
21+ return ESP_OK ;
22+ }
23+
24+ esp_err_t esp_netif_deinit (void )
25+ {
26+ return ESP_OK ;
27+ }
Original file line number Diff line number Diff line change 1+ // Copyright 2020 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+ #pragma once
16+
17+ #include <stdint.h>
18+ #include "sdkconfig.h"
19+ #include "esp_wifi_types.h"
20+ #include "tcpip_adapter.h"
21+
22+ #ifdef __cplusplus
23+ extern "C" {
24+ #endif
25+
26+ /**
27+ * @defgroup ESP_NETIF_INIT_API ESP-NETIF Initialization API
28+ * @brief Add these APIs to make code compatible with esp-idf's newer branch
29+ *
30+ */
31+
32+ /** @addtogroup ESP_NETIF_INIT_API
33+ * @{
34+ */
35+
36+ /**
37+ * @brief Wrapper API to call "tcpip_adapter_init()" really
38+ *
39+ * @return
40+ * - ESP_OK on success
41+
42+ * @note This function should be called exactly once from application code, when the application starts up.
43+ */
44+ esp_err_t esp_netif_init (void );
45+
46+ /**
47+ * @brief Empty function
48+ *
49+ * Note: Deinitialization is not supported yet
50+ *
51+ * @return
52+ * - ESP_OK on success
53+ */
54+ esp_err_t esp_netif_deinit (void );
55+
56+ #ifdef __cplusplus
57+ }
58+ #endif
You can’t perform that action at this time.
0 commit comments