1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-15 09:33:50 +01:00

cpu/esp8266: add init function in dummy lwIP

Calling the initialization function ensures that the dummy lwIP library is used instead of the real lwIP, even if the esp_wifi module for esp8266 is not used.
This commit is contained in:
Gunar Schorcht 2019-01-30 18:54:51 +01:00 committed by Schorcht
parent 0ffc26919f
commit 00ac8ea69a
2 changed files with 11 additions and 0 deletions

View File

@ -210,4 +210,11 @@ uint32_t espconn_init(uint32 arg)
return 1;
}
extern struct netif * eagle_lwip_getif(uint8_t index);
void esp_lwip_init(void)
{
netif_set_default((struct netif *)eagle_lwip_getif(0));
}
#endif /* MODULE_ESP_SDK */

View File

@ -123,6 +123,10 @@ void ets_run(void)
ets_isr_unmask(BIT(ETS_SOFT_INUM));
#endif
/* initialize dummy lwIP library to link it even if esp_wifi is not used */
extern void esp_lwip_init(void);
esp_lwip_init();
thread_create(ets_task_stack, sizeof(ets_task_stack),
ETS_TASK_PRIORITY,
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,