saramonteiro commented on a change in pull request #2939: URL: https://github.com/apache/incubator-nuttx/pull/2939#discussion_r593152732
########## File path: arch/xtensa/src/esp32/Kconfig ########## @@ -852,6 +852,21 @@ endmenu # ESP32_EMAC menu "WiFi configuration" depends on ESP32_WIRELESS +choice + prompt "ESP32 WiFi mode" + default ESP32_WIFI_STATION + +config ESP32_WIFI_STATION + bool "station" Review comment: ```suggestion bool "Station mode" ``` ########## File path: arch/xtensa/src/esp32/Kconfig ########## @@ -852,6 +852,21 @@ endmenu # ESP32_EMAC menu "WiFi configuration" depends on ESP32_WIRELESS +choice + prompt "ESP32 WiFi mode" + default ESP32_WIFI_STATION + +config ESP32_WIFI_STATION + bool "station" + +config ESP32_WIFI_SOFTAP + bool "softAP" + +config ESP32_WIFI_STATION_SOFTAP_COEXISTENCE + bool "station + softAP coexistence" Review comment: ```suggestion bool "Station + SoftAP coexistence" ``` ########## File path: arch/xtensa/src/esp32/esp32_wifi_adapter.c ########## @@ -82,6 +83,26 @@ * Private Types ****************************************************************************/ +/* WiFi station state */ + +enum wifi_sta_state +{ + WIFI_STA_STATE_NULL, + WIFI_STA_STATE_START, + WIFI_STA_STATE_CONNECT, + WIFI_STA_STATE_DISCONNECT, + WIFI_STA_STATE_STOP +}; + +/* WiFi station state */ Review comment: ```suggestion /* WiFi SoftAP state */ ``` ########## File path: arch/xtensa/src/esp32/Kconfig ########## @@ -852,6 +852,21 @@ endmenu # ESP32_EMAC menu "WiFi configuration" depends on ESP32_WIRELESS +choice + prompt "ESP32 WiFi mode" + default ESP32_WIFI_STATION + +config ESP32_WIFI_STATION + bool "station" + +config ESP32_WIFI_SOFTAP + bool "softAP" Review comment: ```suggestion bool "SoftAP mode" ``` ########## File path: arch/xtensa/src/esp32/esp32_cpuint.c ########## @@ -179,9 +179,17 @@ static uint32_t g_intenable[1]; * devices. */ -static uint32_t g_cpu0_freeints = EPS32_CPUINT_PERIPHSET; +static uint32_t g_cpu0_freeints = EPS32_CPUINT_PERIPHSET +#ifdef CONFIG_ESP32_WIRELESS + & (~(1 << ESP32_CPUINT_MAC)) +#endif + ; #ifdef CONFIG_SMP -static uint32_t g_cpu1_freeints = EPS32_CPUINT_PERIPHSET; +static uint32_t g_cpu1_freeints = EPS32_CPUINT_PERIPHSET +#ifdef CONFIG_ESP32_WIRELESS + & (~(1 << ESP32_CPUINT_MAC)) +#endif + ; Review comment: The same here. ########## File path: arch/xtensa/src/esp32/esp32_cpuint.c ########## @@ -179,9 +179,17 @@ static uint32_t g_intenable[1]; * devices. */ -static uint32_t g_cpu0_freeints = EPS32_CPUINT_PERIPHSET; +static uint32_t g_cpu0_freeints = EPS32_CPUINT_PERIPHSET +#ifdef CONFIG_ESP32_WIRELESS + & (~(1 << ESP32_CPUINT_MAC)) +#endif + ; Review comment: ```suggestion #ifdef CONFIG_ESP32_WIRELESS static uint32_t g_cpu0_freeints = EPS32_CPUINT_PERIPHSET & (~ (1 << ESP32_CPUINT_MAC)); #else static uint32_t g_cpu0_freeints = EPS32_CPUINT_PERIPHSET; #endif ``` I think this way it gets easier to understand. What do you think? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org