I got this peacec of code working under esp-idf 5.3.1 without any errors:
Code: Select all
esp_netif_get_ip_info(my_staif, &ipInfo.ip);
ESP_LOGW(TAG4,"My IPV4: " IPSTR "\n", IP2STR(&ipInfo.ip));
Code: Select all
error: passing argument 2 of 'esp_netif_get_ip_info' from incompatible pointer type [-Wincompatible-pointer-types]
84 | esp_netif_get_ip_info(my_staif, &ipInfo.ip);
| ^~~~~~~~~~
| |
| esp_ip4_addr_t * {aka struct esp_ip4_addr *}
note: expected 'esp_netif_ip_info_t *' but argument is of type 'esp_ip4_addr_t *' {aka 'struct esp_ip4_addr *'}
463 | esp_err_t esp_netif_get_ip_info(esp_netif_t *esp_netif, esp_netif_ip_info_t *ip_info);
Code: Select all
esp_netif_ip_info_t ipInfo;
esp_netif_t *my_staif ;
Regards
Gastón