diff --git a/config/project.yml b/config/project.yml index 57657842..c063c852 100644 --- a/config/project.yml +++ b/config/project.yml @@ -150,3 +150,36 @@ unit-test: command: make test_uart_tx query: uart_multiple_boards_tx == '1:1' working_dir: extras/arduino-core-tests + + unit-test-wifi-tcp: + - description: Compiling, flashing and monitoring WIFI TCP server unit test. + command: make test_wifi_server + query: wifi_multiple_boards_server_tcp == '1:1' + working_dir: extras/arduino-core-tests + + - description: Compiling, flashing and monitoring WIFI TCP client unit test. + command: make test_wifi_client + query: wifi_multiple_boards_client_tcp == '1:1' + working_dir: extras/arduino-core-tests + + unit-test-wifi-udp: + - description: Compiling, flashing and monitoring WIFI UDP server unit test. + command: make test_wifi_udp_server + query: wifi_multiple_boards_server_udp == '1:1' + working_dir: extras/arduino-core-tests + + - description: Compiling, flashing and monitoring WIFI UDP client unit test. + command: make test_wifi_udp_client + query: wifi_multiple_boards_client_udp == '1:1' + working_dir: extras/arduino-core-tests + + unit-test-wifi-sta-ap: + - description: Compiling, flashing and monitoring WIFI Access point unit test. + command: make test_wifi_ap + query: wifi_multiple_boards_ap == '1:1' + working_dir: extras/arduino-core-tests + + - description: Compiling, flashing and monitoring WIFI station unit test. + command: make test_wifi_sta + query: wifi_multiple_boards_sta == '1:1' + working_dir: extras/arduino-core-tests diff --git a/config/user.yml b/config/user.yml index 88808e38..17697ed8 100644 --- a/config/user.yml +++ b/config/user.yml @@ -2,13 +2,16 @@ unit-test: - unit-test-iic-pingpong - unit-test-spi-pingpong - unit-test-digital-io - - unit-test-interrupts - unit-test-time - - unit-test-random + - unit-test-uart + - unit-test-interrupts - unit-test-tone - unit-test-spi-loopback - unit-test-iic-single-board + - unit-test-wifi-sta-ap - unit-test-analog-io-adc + - unit-test-random - unit-test-analog-io-pwm - unit-test-pulse - - unit-test-uart + - unit-test-wifi-tcp + - unit-test-wifi-udp \ No newline at end of file diff --git a/extras/arduino-core-tests b/extras/arduino-core-tests index 33e60836..da2d364e 160000 --- a/extras/arduino-core-tests +++ b/extras/arduino-core-tests @@ -1 +1 @@ -Subproject commit 33e60836aaf16eb5f71e45f081514e9aec8e1c27 +Subproject commit da2d364e949c2b75ba63d6f4b3a459e65813b3f3 diff --git a/libraries/WiFi/src/WiFi.cpp b/libraries/WiFi/src/WiFi.cpp index 612ecf8a..953d79a3 100644 --- a/libraries/WiFi/src/WiFi.cpp +++ b/libraries/WiFi/src/WiFi.cpp @@ -312,7 +312,7 @@ int8_t WiFiClass::scanNetworks() { constexpr uint16_t timeout = 1000; /* 1000 times by 10 ms delay = 10 seconds */ uint16_t timer = 0; - while (scan_results.status == CY_WCM_SCAN_INCOMPLETE || timer < timeout) { + while (scan_results.status == CY_WCM_SCAN_INCOMPLETE && timer < timeout) { delay(10); timer++; } diff --git a/libraries/WiFi/src/WiFi.h b/libraries/WiFi/src/WiFi.h index e7c2f30f..01de7c8a 100644 --- a/libraries/WiFi/src/WiFi.h +++ b/libraries/WiFi/src/WiFi.h @@ -30,7 +30,7 @@ typedef enum { } wl_status_t; typedef enum { - WIFI_STATUS_UNINITED = 0, + WIFI_STATUS_UNINITED = 255, WIFI_STATUS_INITED = WL_IDLE_STATUS, WIFI_STATUS_STA_CONNECTED = WL_CONNECTED, WIFI_STATUS_AP_CONNECTED = WL_AP_LISTENING,