@@ -64,7 +64,7 @@ class ArduinoOTAClass : public WiFiOTAClass {
64
64
void end () {
65
65
#if defined(_WIFI_ESP_AT_H_)|| defined(WiFiS3_h) || defined(ESP32) || defined(UIPETHERNET_H)
66
66
server.end ();
67
- #elif defined(ESP8266)
67
+ #elif defined(ESP8266) || (defined(ARDUINO_ARCH_RP2040) && !defined(ARDUINO_ARCH_MBED))
68
68
server.stop ();
69
69
#else
70
70
// #warning "The networking library doesn't have a function to stop the server"
@@ -128,7 +128,7 @@ ArduinoOTAMdnsClass <EthernetServer, EthernetClient, EthernetUDP> ArduinoOTA;
128
128
#elif defined(UIPETHERNET_H) // no UDP multicast implementation yet
129
129
ArduinoOTAClass <EthernetServer, EthernetClient> ArduinoOTA;
130
130
131
- #elif defined(WiFiNINA_h) || defined(WIFI_H) || defined(WiFiS3_h) || defined(ESP8266) || defined(ESP32) || defined(ARDUINO_RASPBERRY_PI_PICO_W) // NINA, WiFi101 and Espressif WiFi
131
+ #elif defined(WiFiNINA_h) || defined(WIFI_H) || defined(WiFiS3_h) || defined(ESP8266) || defined(ESP32) // NINA, WiFi101 and Espressif WiFi
132
132
#ifdef NO_OTA_PORT
133
133
ArduinoOTAClass <WiFiServer, WiFiClient> ArduinoOTA;
134
134
#else
@@ -145,6 +145,14 @@ ArduinoOTAClass <WiFiServer, WiFiClient> ArduinoOTA;
145
145
#elif defined(_WIFISPI_H_INCLUDED) // no UDP multicast implementation
146
146
ArduinoOTAClass <WiFiSpiServer, WiFiSpiClient> ArduinoOTA;
147
147
148
+ #elif defined(ARDUINO_ARCH_RP2040) && !defined(ARDUINO_ARCH_MBED)
149
+ #ifdef NO_OTA_PORT
150
+ ArduinoOTAClass <WiFiServer, WiFiClient> ArduinoOTA;
151
+ #else
152
+ #include < WiFiUdp.h>
153
+ ArduinoOTAMdnsClass <WiFiServer, WiFiClient, WiFiUDP> ArduinoOTA;
154
+ #endif
155
+
148
156
#else
149
157
#warning "Network library not included or not supported"
150
158
#endif
0 commit comments