From bf1557720a7e488e9e07719022dc32b9af867843 Mon Sep 17 00:00:00 2001 From: pennam Date: Mon, 29 Apr 2024 11:26:04 +0200 Subject: [PATCH 1/2] SocketWrapper: remove unused files --- .../src/utility/wl_definitions.h | 78 ------------------- .../SocketWrapper/src/utility/wl_types.h | 53 ------------- 2 files changed, 131 deletions(-) delete mode 100644 libraries/SocketWrapper/src/utility/wl_definitions.h delete mode 100644 libraries/SocketWrapper/src/utility/wl_types.h diff --git a/libraries/SocketWrapper/src/utility/wl_definitions.h b/libraries/SocketWrapper/src/utility/wl_definitions.h deleted file mode 100644 index 9ea1f9fe4..000000000 --- a/libraries/SocketWrapper/src/utility/wl_definitions.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - wl_definitions.h - Library for Arduino Wifi shield. - Copyright (c) 2011-2014 Arduino. All right reserved. - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ -/* - * wl_definitions.h - * - * Created on: Mar 6, 2011 - * Author: dlafauci - */ - -#ifndef WL_DEFINITIONS_H_ -#define WL_DEFINITIONS_H_ - -// Maximum size of a SSID -#define WL_SSID_MAX_LENGTH 32 -// Length of passphrase. Valid lengths are 8-63. -#define WL_WPA_KEY_MAX_LENGTH 63 -// Length of key in bytes. Valid values are 5 and 13. -#define WL_WEP_KEY_MAX_LENGTH 13 -// Size of a MAC-address or BSSID -#define WL_MAC_ADDR_LENGTH 6 -// Size of a MAC-address or BSSID -#define WL_IPV4_LENGTH 4 -// Maximum size of a SSID list -#define WL_NETWORKS_LIST_MAXNUM 10 -// Maxmium number of socket -#define MAX_SOCK_NUM 4 -// Socket not available constant -#define SOCK_NOT_AVAIL 255 -// Default state value for Wifi state field -#define NA_STATE -1 -//Maximum number of attempts to establish wifi connection -#define WL_MAX_ATTEMPT_CONNECTION 10 - -typedef enum { - WL_NO_SHIELD = 255, - WL_NO_MODULE = 255, - WL_IDLE_STATUS = 0, - WL_NO_SSID_AVAIL, - WL_SCAN_COMPLETED, - WL_CONNECTED, - WL_CONNECT_FAILED, - WL_CONNECTION_LOST, - WL_DISCONNECTED, - WL_AP_LISTENING, - WL_AP_CONNECTED, - WL_AP_FAILED -} wl_status_t; - -/* Encryption modes */ -enum wl_enc_type { /* Values map to 802.11 encryption suites... */ - ENC_TYPE_WEP = 5, - ENC_TYPE_TKIP = 2, - ENC_TYPE_CCMP = 4, - /* ... except these two, 7 and 8 are reserved in 802.11-2007 */ - ENC_TYPE_NONE = 7, - ENC_TYPE_UNKNOWN = 9, - ENC_TYPE_AUTO = 8 -}; - -#if defined(ARDUINO_PORTENTA_H7_M7) -#include "whd_version.h" -#define WIFI_FIRMWARE_LATEST_VERSION WHD_VERSION -#endif - -#endif /* WL_DEFINITIONS_H_ */ diff --git a/libraries/SocketWrapper/src/utility/wl_types.h b/libraries/SocketWrapper/src/utility/wl_types.h deleted file mode 100644 index 65f8caae2..000000000 --- a/libraries/SocketWrapper/src/utility/wl_types.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - wl_types.h - Library for Arduino Wifi shield. - Copyright (c) 2011-2014 Arduino. All right reserved. - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ -/* - * wl_types.h - * - * Created on: Jul 30, 2010 - * Author: dlafauci - */ - - -#ifndef _WL_TYPES_H_ -#define _WL_TYPES_H_ - -#include - -typedef enum { - WL_FAILURE = -1, - WL_SUCCESS = 1, -} wl_error_code_t; - -/* Authentication modes */ -enum wl_auth_mode { - AUTH_MODE_INVALID, - AUTH_MODE_AUTO, - AUTH_MODE_OPEN_SYSTEM, - AUTH_MODE_SHARED_KEY, - AUTH_MODE_WPA, - AUTH_MODE_WPA2, - AUTH_MODE_WPA_PSK, - AUTH_MODE_WPA2_PSK -}; - -typedef enum { - WL_PING_DEST_UNREACHABLE = -1, - WL_PING_TIMEOUT = -2, - WL_PING_UNKNOWN_HOST = -3, - WL_PING_ERROR = -4 -} wl_ping_result_t; - -#endif //_WL_TYPES_H_ \ No newline at end of file From 0183e059f77519d88757cff848a11f4f9a99b963 Mon Sep 17 00:00:00 2001 From: pennam Date: Mon, 29 Apr 2024 11:26:19 +0200 Subject: [PATCH 2/2] Add WHD_VERSION definition for GIGA OPTA and NICLA VISION --- libraries/WiFi/src/utility/wl_definitions.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/WiFi/src/utility/wl_definitions.h b/libraries/WiFi/src/utility/wl_definitions.h index 3e6239140..43091d590 100644 --- a/libraries/WiFi/src/utility/wl_definitions.h +++ b/libraries/WiFi/src/utility/wl_definitions.h @@ -74,7 +74,8 @@ enum wl_enc_type { /* Values map to 802.11 Cipher Algorithm Identifier */ ENC_TYPE_AUTO = 8 }; -#if defined(ARDUINO_PORTENTA_H7_M7) +#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION) || \ + defined(ARDUINO_GIGA) || defined(ARDUINO_OPTA) #include "whd_version.h" #define WIFI_FIRMWARE_LATEST_VERSION WHD_VERSION #endif