Skip to content

Commit ca31476

Browse files
committed
Tidy up
1 parent d7db4c0 commit ca31476

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

pico_w/wifi/ota_update/picow_ota_update.c

+6-11
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
#include "boot/picoboot.h"
1616
#include "boot/uf2.h"
1717

18-
#include "bootrom_structs.h"
19-
2018
#include "lwip/pbuf.h"
2119
#include "lwip/tcp.h"
2220

@@ -322,17 +320,14 @@ int main() {
322320

323321
if (rom_get_last_boot_type() == BOOT_TYPE_FLASH_UPDATE) {
324322
printf("Someone updated into me\n");
325-
printf("Params were %x %x\n", boot_info.reboot_params[0], boot_info.reboot_params[1]);
326-
printf("Update info %x\n", boot_info.tbyb_and_update_info);
327-
printf("TBYB flash address is %x\n", always->zero_init.tbyb_flag_flash_addr);
328-
printf("TBYB erase address is %x\n", always->zero_init.version_downgrade_erase_flash_addr);
329-
printf("Workarea at %x\n", workarea);
323+
if (boot_info.reboot_params[0]) printf("Flash update base was %x\n", boot_info.reboot_params[0]);
324+
if (boot_info.tbyb_and_update_info) printf("Update info %x\n", boot_info.tbyb_and_update_info);
325+
if (always->zero_init.tbyb_flag_flash_addr) printf("TBYB flash address is %x\n", always->zero_init.tbyb_flag_flash_addr);
326+
if (always->zero_init.version_downgrade_erase_flash_addr) printf("TBYB erase address is %x\n", always->zero_init.version_downgrade_erase_flash_addr);
330327
ret = rom_explicit_buy(workarea, sizeof(workarea));
331-
printf("Buy returned %d\n", ret);
328+
if (ret) printf("Buy returned %d\n", ret);
332329
ret = rom_get_boot_info(&boot_info);
333-
printf("Update info now %x\n", boot_info.tbyb_and_update_info);
334-
printf("TBYB flash address is %x\n", always->zero_init.tbyb_flag_flash_addr);
335-
printf("TBYB erase address is %x\n", always->zero_init.version_downgrade_erase_flash_addr);
330+
if (boot_info.tbyb_and_update_info) printf("Update info now %x\n", boot_info.tbyb_and_update_info);
336331
}
337332

338333

0 commit comments

Comments
 (0)