clang
This commit is contained in:
parent
c28c813666
commit
2901bb7a88
1 changed files with 10 additions and 7 deletions
|
|
@ -245,11 +245,16 @@ bool Adafruit_TestBed_Brains::dap_connect(void) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t const page_size = dap->target_device.n_pages ? (dap->target_device.flash_size/dap->target_device.n_pages) : 0;
|
uint32_t const page_size =
|
||||||
|
dap->target_device.n_pages
|
||||||
|
? (dap->target_device.flash_size / dap->target_device.n_pages)
|
||||||
|
: 0;
|
||||||
|
|
||||||
Serial.printf("Found Target: %s, ID = %08X\n", dap->target_device.name, dsu_did);
|
Serial.printf("Found Target: %s, ID = %08X\n", dap->target_device.name,
|
||||||
|
dsu_did);
|
||||||
Serial.printf("Flash size: %u, Page Num: %u, Page Size: %u\n",
|
Serial.printf("Flash size: %u, Page Num: %u, Page Size: %u\n",
|
||||||
dap->target_device.flash_size, dap->target_device.n_pages, page_size);
|
dap->target_device.flash_size, dap->target_device.n_pages,
|
||||||
|
page_size);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -292,9 +297,8 @@ bool Adafruit_TestBed_Brains::dap_eraseChip(void) {
|
||||||
|
|
||||||
// NOTE: STM32 does erase on-the-fly therefore erasing is not needed
|
// NOTE: STM32 does erase on-the-fly therefore erasing is not needed
|
||||||
if (dap_typeid == DAP_TYPEID_STM32) {
|
if (dap_typeid == DAP_TYPEID_STM32) {
|
||||||
LCD_printf("Erasing..skipped");
|
LCD_printf("Erasing..skipped");
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
LCD_printf("Erasing..");
|
LCD_printf("Erasing..");
|
||||||
uint32_t ms = millis();
|
uint32_t ms = millis();
|
||||||
|
|
||||||
|
|
@ -385,7 +389,6 @@ size_t Adafruit_TestBed_Brains::dap_programFlash(const char *fpath,
|
||||||
return fsize;
|
return fsize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
// SD Card
|
// SD Card
|
||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue