fix(esp_netif): Fixed initializer order of ESP_IP macros for C++

This commit is contained in:
snake-4 2024-08-21 05:04:09 +02:00 committed by GitHub
parent cdee290a5d
commit f371940992
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -79,8 +79,8 @@ extern "C" {
#define ESP_IP4TOADDR(a,b,c,d) esp_netif_htonl(ESP_IP4TOUINT32(a, b, c, d)) #define ESP_IP4TOADDR(a,b,c,d) esp_netif_htonl(ESP_IP4TOUINT32(a, b, c, d))
#define ESP_IP4ADDR_INIT(a, b, c, d) { .type = ESP_IPADDR_TYPE_V4, .u_addr = { .ip4 = { .addr = ESP_IP4TOADDR(a, b, c, d) }}} #define ESP_IP4ADDR_INIT(a, b, c, d) { .u_addr = { .ip4 = { .addr = ESP_IP4TOADDR(a, b, c, d) }}, .type = ESP_IPADDR_TYPE_V4 }
#define ESP_IP6ADDR_INIT(a, b, c, d) { .type = ESP_IPADDR_TYPE_V6, .u_addr = { .ip6 = { .addr = { a, b, c, d }, .zone = 0 }}} #define ESP_IP6ADDR_INIT(a, b, c, d) { .u_addr = { .ip6 = { .addr = { a, b, c, d }, .zone = 0 }}, .type = ESP_IPADDR_TYPE_V6 }
#ifndef IP4ADDR_STRLEN_MAX #ifndef IP4ADDR_STRLEN_MAX
#define IP4ADDR_STRLEN_MAX 16 #define IP4ADDR_STRLEN_MAX 16