@@ -84,7 +84,7 @@ void URI::parse(const string& url_s)
84
84
85
85
int rp2040_connect_onOTARequest (char const * ota_url)
86
86
{
87
- mbed_watchdog_reset ();
87
+ watchdog_reset ();
88
88
89
89
int err = -1 ;
90
90
FlashIAPBlockDevice flash (XIP_BASE + 0xF00000 , 0x100000 );
@@ -94,11 +94,11 @@ int rp2040_connect_onOTARequest(char const * ota_url)
94
94
return static_cast <int >(OTAError::RP2040_ErrorFlashInit);
95
95
}
96
96
97
- mbed_watchdog_reset ();
97
+ watchdog_reset ();
98
98
99
99
flash.erase (XIP_BASE + 0xF00000 , 0x100000 );
100
100
101
- mbed_watchdog_reset ();
101
+ watchdog_reset ();
102
102
103
103
mbed::FATFileSystem fs (" ota" );
104
104
if ((err = fs.reformat (&flash)) != 0 )
@@ -107,7 +107,7 @@ int rp2040_connect_onOTARequest(char const * ota_url)
107
107
return static_cast <int >(OTAError::RP2040_ErrorReformat);
108
108
}
109
109
110
- mbed_watchdog_reset ();
110
+ watchdog_reset ();
111
111
112
112
FILE * file = fopen (" /ota/UPDATE.BIN.LZSS" , " wb" );
113
113
if (!file)
@@ -117,7 +117,7 @@ int rp2040_connect_onOTARequest(char const * ota_url)
117
117
return static_cast <int >(OTAError::RP2040_ErrorOpenUpdateFile);
118
118
}
119
119
120
- mbed_watchdog_reset ();
120
+ watchdog_reset ();
121
121
122
122
URI url (ota_url);
123
123
Client * client = nullptr ;
@@ -135,7 +135,7 @@ int rp2040_connect_onOTARequest(char const * ota_url)
135
135
return static_cast <int >(OTAError::RP2040_UrlParseError);
136
136
}
137
137
138
- mbed_watchdog_reset ();
138
+ watchdog_reset ();
139
139
140
140
if (!client->connect (url.host_ .c_str (), port))
141
141
{
@@ -144,14 +144,14 @@ int rp2040_connect_onOTARequest(char const * ota_url)
144
144
return static_cast <int >(OTAError::RP2040_ServerConnectError);
145
145
}
146
146
147
- mbed_watchdog_reset ();
147
+ watchdog_reset ();
148
148
149
149
client->println (String (" GET " ) + url.path_ .c_str () + " HTTP/1.1" );
150
150
client->println (String (" Host: " ) + url.host_ .c_str ());
151
151
client->println (" Connection: close" );
152
152
client->println ();
153
153
154
- mbed_watchdog_reset ();
154
+ watchdog_reset ();
155
155
156
156
/* Receive HTTP header. */
157
157
String http_header;
@@ -162,7 +162,7 @@ int rp2040_connect_onOTARequest(char const * ota_url)
162
162
is_http_header_timeout = (millis () - start) > AIOT_CONFIG_RP2040_OTA_HTTP_HEADER_RECEIVE_TIMEOUT_ms;
163
163
if (is_http_header_timeout) break ;
164
164
165
- mbed_watchdog_reset ();
165
+ watchdog_reset ();
166
166
167
167
if (client->available ())
168
168
{
@@ -208,7 +208,7 @@ int rp2040_connect_onOTARequest(char const * ota_url)
208
208
is_http_data_timeout = (millis () - start) > AIOT_CONFIG_RP2040_OTA_HTTP_DATA_RECEIVE_TIMEOUT_ms;
209
209
if (is_http_data_timeout) break ;
210
210
211
- mbed_watchdog_reset ();
211
+ watchdog_reset ();
212
212
213
213
if (client->available ())
214
214
{
0 commit comments