Skip to content

Commit 94d5398

Browse files
committed
Correct some AVR warnings
1 parent e3f149b commit 94d5398

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/Tools/FirmwareUpdater/ESP32BootROM.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,14 +259,14 @@ void ESP32BootROMClass::command(int opcode, const void* data, uint16_t length)
259259
#endif
260260
}
261261

262-
int ESP32BootROMClass::response(int opcode, unsigned int timeout, void* body)
262+
int ESP32BootROMClass::response(int opcode, unsigned long timeout, void* body)
263263
{
264264
uint8_t data[10 + 256];
265265
uint16_t index = 0;
266266

267267
uint8_t responseLength = 4;
268268

269-
for (unsigned long start = millis(); (index < (10 + responseLength)) && (millis() - start) < timeout;) {
269+
for (unsigned long start = millis(); (index < (uint16_t)(10 + responseLength)) && (millis() - start) < timeout;) {
270270
if (_serial->available()) {
271271
data[index] = _serial->read();
272272

@@ -294,7 +294,7 @@ int ESP32BootROMClass::response(int opcode, unsigned int timeout, void* body)
294294
}
295295
#endif
296296

297-
if (index != (10 + responseLength)) {
297+
if (index != (uint16_t)(10 + responseLength)) {
298298
return -1;
299299
}
300300

examples/Tools/FirmwareUpdater/ESP32BootROM.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class ESP32BootROMClass {
4040
int spiAttach();
4141

4242
void command(int opcode, const void* data, uint16_t length);
43-
int response(int opcode, unsigned int timeout, void* body = NULL);
43+
int response(int opcode, unsigned long timeout, void* body = NULL);
4444

4545
void writeEscapedBytes(const uint8_t* data, uint16_t length);
4646

0 commit comments

Comments
 (0)