Skip to content
Prev Previous commit
Next Next commit
QSPIFormat: fix warnings
  • Loading branch information
pennam committed May 6, 2025
commit 45c9eae3d7f52f5cba4985a14730f3f6b10904d0
13 changes: 7 additions & 6 deletions libraries/STM32H747_System/examples/QSPIFormat/QSPIFormat.ino
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,27 @@ FileSystem * user_data_fs;

bool waitResponse() {
bool confirmation = false;
bool proceed = false;
while (confirmation == false) {
if (Serial.available()) {
char choice = Serial.read();
switch (choice) {
case 'y':
case 'Y':
confirmation = true;
return true;
proceed = true;
break;
case 'n':
case 'N':
confirmation = true;
return false;
proceed = false;
break;
default:
continue;
}
}
}
return proceed;
}

void printProgress(uint32_t offset, uint32_t size, uint32_t threshold, bool reset) {
Expand Down Expand Up @@ -151,11 +153,10 @@ void setup() {

void flashWiFiFirmwareAndCertificates() {
extern const unsigned char wifi_firmware_image_data[];
extern const resource_hnd_t wifi_firmware_image;
FILE* fp = fopen("/wlan/4343WA1.BIN", "wb");
const int file_size = 421098;
int chunck_size = 1024;
int byte_count = 0;
const uint32_t file_size = 421098;
uint32_t chunck_size = 1024;
uint32_t byte_count = 0;

Serial.println("Flashing WiFi firmware");
printProgress(byte_count, file_size, 10, true);
Expand Down