mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
header: callbacks use "void *" as arguments
This commit is contained in:
parent
c5f8396df4
commit
c56a790f64
@ -198,7 +198,7 @@ static void do_global_ctors(void) {
|
||||
(*p)();
|
||||
}
|
||||
|
||||
extern esp_err_t app_main();
|
||||
extern esp_err_t app_main(void *param);
|
||||
|
||||
void user_start_cpu0(void) {
|
||||
ets_setup_syscalls();
|
||||
@ -223,7 +223,7 @@ void user_start_cpu0(void) {
|
||||
#include "esp_wifi.h"
|
||||
esp_wifi_startup(app_main);
|
||||
#else
|
||||
app_main();
|
||||
app_main(NULL);
|
||||
#endif
|
||||
|
||||
ets_printf("Starting scheduler on PRO CPU.\n");
|
||||
|
@ -108,12 +108,12 @@ typedef struct {
|
||||
/**
|
||||
* @brief Application specified event callback function
|
||||
*
|
||||
* @param system_event_t *event : event type defined in this file
|
||||
* @param void *param : parameter passed to callback function
|
||||
*
|
||||
* @return ESP_OK : succeed
|
||||
* @return others : fail
|
||||
*/
|
||||
typedef esp_err_t (*system_event_cb_t)(system_event_t *event);
|
||||
typedef esp_err_t (*system_event_cb_t)(void *param);
|
||||
|
||||
/**
|
||||
* @brief Set application specified event callback function
|
||||
@ -123,8 +123,7 @@ typedef esp_err_t (*system_event_cb_t)(system_event_t *event);
|
||||
*
|
||||
* @param system_event_cb_t cb : callback
|
||||
*
|
||||
* @return ESP_OK : succeed
|
||||
* @return others : fail
|
||||
* @return system_event_cb_t : old callback
|
||||
*/
|
||||
system_event_cb_t esp_event_set_cb(system_event_cb_t cb);
|
||||
|
||||
|
@ -153,7 +153,7 @@ typedef enum {
|
||||
* @return ESP_OK : succeed
|
||||
* @return others : fail
|
||||
*/
|
||||
typedef esp_err_t (* wifi_startup_cb_t)(void);
|
||||
typedef esp_err_t (* wifi_startup_cb_t)(void *param);
|
||||
void esp_wifi_startup(wifi_startup_cb_t cb);
|
||||
|
||||
typedef struct {
|
||||
|
@ -54,7 +54,7 @@ static void esp_wifi_task(void *pvParameters)
|
||||
}
|
||||
|
||||
if (startup_cb) {
|
||||
err = (*startup_cb)();
|
||||
err = (*startup_cb)(NULL);
|
||||
if (err != ESP_OK) {
|
||||
WIFI_DEBUG("startup_cb fail, ret=%d\n", err);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user