@@ -84,7 +84,7 @@ void URI::parse(const string& url_s)
8484
8585int rp2040_connect_onOTARequest (char const * ota_url)
8686{
87- mbed_watchdog_reset ();
87+ watchdog_reset ();
8888
8989 int err = -1 ;
9090 FlashIAPBlockDevice flash (XIP_BASE + 0xF00000 , 0x100000 );
@@ -94,11 +94,11 @@ int rp2040_connect_onOTARequest(char const * ota_url)
9494 return static_cast <int >(OTAError::RP2040_ErrorFlashInit);
9595 }
9696
97- mbed_watchdog_reset ();
97+ watchdog_reset ();
9898
9999 flash.erase (XIP_BASE + 0xF00000 , 0x100000 );
100100
101- mbed_watchdog_reset ();
101+ watchdog_reset ();
102102
103103 mbed::FATFileSystem fs (" ota" );
104104 if ((err = fs.reformat (&flash)) != 0 )
@@ -107,7 +107,7 @@ int rp2040_connect_onOTARequest(char const * ota_url)
107107 return static_cast <int >(OTAError::RP2040_ErrorReformat);
108108 }
109109
110- mbed_watchdog_reset ();
110+ watchdog_reset ();
111111
112112 FILE * file = fopen (" /ota/UPDATE.BIN.LZSS" , " wb" );
113113 if (!file)
@@ -117,7 +117,7 @@ int rp2040_connect_onOTARequest(char const * ota_url)
117117 return static_cast <int >(OTAError::RP2040_ErrorOpenUpdateFile);
118118 }
119119
120- mbed_watchdog_reset ();
120+ watchdog_reset ();
121121
122122 URI url (ota_url);
123123 Client * client = nullptr ;
@@ -135,7 +135,7 @@ int rp2040_connect_onOTARequest(char const * ota_url)
135135 return static_cast <int >(OTAError::RP2040_UrlParseError);
136136 }
137137
138- mbed_watchdog_reset ();
138+ watchdog_reset ();
139139
140140 if (!client->connect (url.host_ .c_str (), port))
141141 {
@@ -144,14 +144,14 @@ int rp2040_connect_onOTARequest(char const * ota_url)
144144 return static_cast <int >(OTAError::RP2040_ServerConnectError);
145145 }
146146
147- mbed_watchdog_reset ();
147+ watchdog_reset ();
148148
149149 client->println (String (" GET " ) + url.path_ .c_str () + " HTTP/1.1" );
150150 client->println (String (" Host: " ) + url.host_ .c_str ());
151151 client->println (" Connection: close" );
152152 client->println ();
153153
154- mbed_watchdog_reset ();
154+ watchdog_reset ();
155155
156156 /* Receive HTTP header. */
157157 String http_header;
@@ -162,7 +162,7 @@ int rp2040_connect_onOTARequest(char const * ota_url)
162162 is_http_header_timeout = (millis () - start) > AIOT_CONFIG_RP2040_OTA_HTTP_HEADER_RECEIVE_TIMEOUT_ms;
163163 if (is_http_header_timeout) break ;
164164
165- mbed_watchdog_reset ();
165+ watchdog_reset ();
166166
167167 if (client->available ())
168168 {
@@ -208,7 +208,7 @@ int rp2040_connect_onOTARequest(char const * ota_url)
208208 is_http_data_timeout = (millis () - start) > AIOT_CONFIG_RP2040_OTA_HTTP_DATA_RECEIVE_TIMEOUT_ms;
209209 if (is_http_data_timeout) break ;
210210
211- mbed_watchdog_reset ();
211+ watchdog_reset ();
212212
213213 if (client->available ())
214214 {
0 commit comments