فهرست منبع

Merge branch 'bugfix/wifi_fix_adapter_argument_types' into 'master'

esp_wifi: make int types consistent

See merge request espressif/esp-idf!18222
Jiang Jiang Jian 3 سال پیش
والد
کامیت
769bc9b2d2

+ 1 - 1
components/esp_wifi/esp32/esp_adapter.c

@@ -660,7 +660,7 @@ static void IRAM_ATTR esp_empty_wrapper(void)
 
 }
 
-int32_t IRAM_ATTR coex_is_in_isr_wrapper(void)
+int IRAM_ATTR coex_is_in_isr_wrapper(void)
 {
     return !xPortCanYield();
 }

+ 4 - 4
components/esp_wifi/esp32c2/esp_adapter.c

@@ -458,17 +458,17 @@ static void * IRAM_ATTR zalloc_internal_wrapper(size_t size)
     return ptr;
 }
 
-static esp_err_t nvs_open_wrapper(const char* name, uint32_t open_mode, nvs_handle_t *out_handle)
+static esp_err_t nvs_open_wrapper(const char* name, unsigned int open_mode, nvs_handle_t *out_handle)
 {
     return nvs_open(name,(nvs_open_mode_t)open_mode, out_handle);
 }
 
-static void esp_log_writev_wrapper(uint32_t level, const char *tag, const char *format, va_list args)
+static void esp_log_writev_wrapper(unsigned int level, const char *tag, const char *format, va_list args)
 {
     return esp_log_writev((esp_log_level_t)level,tag,format,args);
 }
 
-static void esp_log_write_wrapper(uint32_t level,const char *tag,const char *format, ...)
+static void esp_log_write_wrapper(unsigned int level,const char *tag,const char *format, ...)
 {
     va_list list;
     va_start(list, format);
@@ -476,7 +476,7 @@ static void esp_log_write_wrapper(uint32_t level,const char *tag,const char *for
     va_end(list);
 }
 
-static esp_err_t esp_read_mac_wrapper(uint8_t* mac, uint32_t type)
+static esp_err_t esp_read_mac_wrapper(uint8_t* mac, unsigned int type)
 {
     return esp_read_mac(mac, (esp_mac_type_t)type);
 }

+ 4 - 4
components/esp_wifi/esp32c3/esp_adapter.c

@@ -458,17 +458,17 @@ static void * IRAM_ATTR zalloc_internal_wrapper(size_t size)
     return ptr;
 }
 
-static esp_err_t nvs_open_wrapper(const char* name, uint32_t open_mode, nvs_handle_t *out_handle)
+static esp_err_t nvs_open_wrapper(const char* name, unsigned int open_mode, nvs_handle_t *out_handle)
 {
     return nvs_open(name,(nvs_open_mode_t)open_mode, out_handle);
 }
 
-static void esp_log_writev_wrapper(uint32_t level, const char *tag, const char *format, va_list args)
+static void esp_log_writev_wrapper(unsigned int level, const char *tag, const char *format, va_list args)
 {
     return esp_log_writev((esp_log_level_t)level,tag,format,args);
 }
 
-static void esp_log_write_wrapper(uint32_t level,const char *tag,const char *format, ...)
+static void esp_log_write_wrapper(unsigned int level,const char *tag,const char *format, ...)
 {
     va_list list;
     va_start(list, format);
@@ -476,7 +476,7 @@ static void esp_log_write_wrapper(uint32_t level,const char *tag,const char *for
     va_end(list);
 }
 
-static esp_err_t esp_read_mac_wrapper(uint8_t* mac, uint32_t type)
+static esp_err_t esp_read_mac_wrapper(uint8_t* mac, unsigned int type)
 {
     return esp_read_mac(mac, (esp_mac_type_t)type);
 }

+ 1 - 1
components/esp_wifi/esp32s2/esp_adapter.c

@@ -663,7 +663,7 @@ static void IRAM_ATTR esp_empty_wrapper(void)
 
 }
 
-int32_t IRAM_ATTR coex_is_in_isr_wrapper(void)
+int IRAM_ATTR coex_is_in_isr_wrapper(void)
 {
     return !xPortCanYield();
 }

+ 1 - 1
components/esp_wifi/esp32s3/esp_adapter.c

@@ -680,7 +680,7 @@ static void IRAM_ATTR esp_empty_wrapper(void)
 
 }
 
-int32_t IRAM_ATTR coex_is_in_isr_wrapper(void)
+int IRAM_ATTR coex_is_in_isr_wrapper(void)
 {
     return !xPortCanYield();
 }

+ 5 - 5
components/esp_wifi/include/esp_private/wifi_os_adapter.h

@@ -66,7 +66,7 @@ typedef struct {
     int32_t (* _task_ms_to_tick)(uint32_t ms);
     void *(* _task_get_current_task)(void);
     int32_t (* _task_get_max_priority)(void);
-    void *(* _malloc)(unsigned int size);
+    void *(* _malloc)(size_t size);
     void (* _free)(void *p);
     int32_t (* _event_post)(const char* event_base, int32_t event_id, void* event_data, size_t event_data_size, uint32_t ticks_to_wait);
     uint32_t (* _get_free_heap_size)(void);
@@ -82,7 +82,7 @@ typedef struct {
     void (* _phy_common_clock_disable)(void);
 #endif
     int (* _phy_update_country_info)(const char* country);
-    int (* _read_mac)(uint8_t* mac, uint32_t type);
+    int (* _read_mac)(uint8_t* mac, unsigned int type);
     void (* _timer_arm)(void *timer, uint32_t tmout, bool repeat);
     void (* _timer_disarm)(void *timer);
     void (* _timer_done)(void *ptimer);
@@ -100,7 +100,7 @@ typedef struct {
     int (* _nvs_get_u8)(uint32_t handle, const char* key, uint8_t* out_value);
     int (* _nvs_set_u16)(uint32_t handle, const char* key, uint16_t value);
     int (* _nvs_get_u16)(uint32_t handle, const char* key, uint16_t* out_value);
-    int (* _nvs_open)(const char* name, uint32_t open_mode, uint32_t *out_handle);
+    int (* _nvs_open)(const char* name, unsigned int open_mode, uint32_t *out_handle);
     void (* _nvs_close)(uint32_t handle);
     int (* _nvs_commit)(uint32_t handle);
     int (* _nvs_set_blob)(uint32_t handle, const char* key, const void* value, size_t length);
@@ -112,8 +112,8 @@ typedef struct {
 #if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C2
     uint32_t (* _slowclk_cal_get)(void);
 #endif
-    void (* _log_write)(uint32_t level, const char* tag, const char* format, ...);
-    void (* _log_writev)(uint32_t level, const char* tag, const char* format, va_list args);
+    void (* _log_write)(unsigned int level, const char* tag, const char* format, ...);
+    void (* _log_writev)(unsigned int level, const char* tag, const char* format, va_list args);
     uint32_t (* _log_timestamp)(void);
     void * (* _malloc_internal)(size_t size);
     void * (* _realloc_internal)(void *ptr, size_t size);

+ 1 - 1
components/esp_wifi/lib

@@ -1 +1 @@
-Subproject commit 05794b1c8898c9b43bd8c1b3418dea0f140ec303
+Subproject commit 0d5920de9592ae63ecb40471e895931fee2b0a66