This commit is contained in:
hathach 2023-01-11 11:52:30 +07:00
parent c28c813666
commit 2901bb7a88
No known key found for this signature in database
GPG key ID: F5D50C6D51D17CBA

View file

@ -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
//--------------------------------------------------------------------+ //--------------------------------------------------------------------+