1 #pragma once 2 3 #include "esp_compiler.h" 4 5 typedef struct { 6 const char * char_star; 7 const char char_array[10]; 8 int x; 9 float y; 10 struct var_struct_t { 11 } var_struct; 12 } g_netif_test_struct_t; 13 14 #define NETIF_TEST_STRUCT_EMPTY() \ 15 { \ 16 ESP_COMPILER_DESIGNATED_INIT_AGGREGATE_TYPE_EMPTY(char_star) \ 17 ESP_COMPILER_DESIGNATED_INIT_AGGREGATE_TYPE_EMPTY(char_array) \ 18 .x = 0, \ 19 .y = 0.0, \ 20 ESP_COMPILER_DESIGNATED_INIT_AGGREGATE_TYPE_EMPTY(var_struct) \ 21 } 22 23 #define NETIF_TEST_STRUCT_DEFAULT() \ 24 { \ 25 .char_star = "Espressif", \ 26 ESP_COMPILER_DESIGNATED_INIT_AGGREGATE_TYPE_STR(char_array, "Espressif") \ 27 .x = 42, \ 28 .y = 42.192, \ 29 ESP_COMPILER_DESIGNATED_INIT_AGGREGATE_TYPE_EMPTY(var_struct) \ 30 } 31