feat(esp8266): Using global functions instead of function table

The Wi-Fi adapter APIs are only used by internal libraires.
This commit is contained in:
dongheng
2019-03-25 16:37:20 +08:00
parent 5425ce051f
commit be88feb395
16 changed files with 64 additions and 567 deletions

View File

@ -25,13 +25,19 @@
#include "esp_log.h"
#include "esp_image_format.h"
#include "esp_phy_init.h"
#include "esp_wifi_osi.h"
#include "esp_heap_caps_init.h"
#include "esp_task_wdt.h"
#include "internal/esp_wifi_internal.h"
#include "internal/esp_system_internal.h"
#include "esp8266/eagle_soc.h"
#include "FreeRTOS.h"
#include "task.h"
#if defined(CONFIG_NEWLIB_LIBRARY_LEVEL_NORMAL) || defined(CONFIG_NEWLIB_LIBRARY_LEVEL_NANO)
#include "esp_newlib.h"
#endif
extern void chip_boot(void);
extern int rtc_init(void);
extern int mac_init(void);
@ -95,7 +101,7 @@ static void user_init_entry(void *param)
app_main();
wifi_task_delete(NULL);
vTaskDelete(NULL);
}
void call_user_start(size_t start_addr)
@ -149,9 +155,11 @@ void call_user_start(size_t start_addr)
heap_caps_init();
wifi_os_init();
#if defined(CONFIG_NEWLIB_LIBRARY_LEVEL_NORMAL) || defined(CONFIG_NEWLIB_LIBRARY_LEVEL_NANO)
esp_newlib_init();
#endif
assert(wifi_task_create(user_init_entry, "uiT", CONFIG_MAIN_TASK_STACK_SIZE, NULL, wifi_task_get_max_priority()) != NULL);
assert(xTaskCreate(user_init_entry, "uiT", CONFIG_MAIN_TASK_STACK_SIZE, NULL, configMAX_PRIORITIES, NULL) == pdPASS);
wifi_os_start();
vTaskStartScheduler();
}