callback: add a void* pointer with each callback

also format event.c/wifi.c/esp_event.h/esp_wifi.h
This commit is contained in:
Wu Jian Gang
2016-09-13 15:57:11 +08:00
parent c56a790f64
commit bf5e83a6ed
5 changed files with 155 additions and 134 deletions

View File

@@ -149,12 +149,14 @@ typedef enum {
* be called firstly
*
* @param wifi_startup_cb_t cb : application specific callback function
* @param void *ctx : reversed for user
*
* @return ESP_OK : succeed
* @return others : fail
*/
typedef esp_err_t (* wifi_startup_cb_t)(void *param);
void esp_wifi_startup(wifi_startup_cb_t cb);
typedef esp_err_t (* wifi_startup_cb_t)(void *ctx);
esp_err_t esp_wifi_startup(wifi_startup_cb_t cb, void *ctx);
typedef struct {
void *event_q; /**< WiFi event q handler, it's a freeRTOS queue */