1. Hello World application shows no footprint difference before and
after this change
2. examples/ethernet/ethernet application compiles properly (can't
test with my board)
Since only the used interface's start function gets called, it pulls
in only the functions that are required in the current application,
thereby saving footprint.
Restart being a lower-layer system-level function, needn't depend on
the higher level Wi-Fi libraries.
This also enables us to get rid of one more WIFI_ENABLED ifdef check
1. Add detailed return error code for wifi APIs
2. Add description about error code in esp_wifi.h
3. Modify esp_wifi_reg_rxcb to esp_wifi_internal_reg_rxcb
4. Modify esp_wifi_set_sta_ip to esp_wifi_internal_set_sta_ip
5. Mark system_init as deprecated API
This change separates definitions in esp_event.h and functions in event.c into several parts:
- event structure definitions (esp_event.h)
- default implementations of event handlers (event_default_handlers.c)
- default implementation of event loop (event_loop.c, esp_event_loop.h)
Purpose of this change is to allow applications choose their own poison:
- full control of event loop at the expense of more bootstrap code
- pre-defined event task firing event callbacks, but less code in app_main.c