static int max32xxx_mass_erase(struct flash_bank *bank);
struct max32xxx_flash_bank {
- int probed;
+ bool probed;
int max326xx;
unsigned int flash_size;
unsigned int flc_base;
int printed;
struct max32xxx_flash_bank *info = bank->driver_priv;
- if (info->probed == 0)
+ if (!info->probed)
return ERROR_FLASH_BANK_NOT_PROBED;
printed = snprintf(buf, buf_size, "\nMaxim Integrated max32xxx flash driver\n");
struct target *target = bank->target;
uint32_t temp_reg;
- if (info->probed == 0)
+ if (!info->probed)
return ERROR_FLASH_BANK_NOT_PROBED;
if (!info->max326xx) {
return ERROR_TARGET_NOT_HALTED;
}
- if (info->probed == 0)
+ if (!info->probed)
return ERROR_FLASH_BANK_NOT_PROBED;
if ((last < first) || (last >= bank->num_sectors))
return ERROR_TARGET_NOT_HALTED;
}
- if (info->probed == 0)
+ if (!info->probed)
return ERROR_FLASH_BANK_NOT_PROBED;
if (!info->max326xx)
LOG_DEBUG("bank=%p buffer=%p offset=%08" PRIx32 " count=%08" PRIx32 "",
bank, buffer, offset, count);
- if (info->probed == 0)
+ if (!info->probed)
return ERROR_FLASH_BANK_NOT_PROBED;
if (offset & 0x3) {
if (max32xxx_protect_check(bank) == ERROR_FLASH_OPER_UNSUPPORTED)
LOG_WARNING("Flash protection not supported on this device");
- info->probed = 1;
+ info->probed = true;
return ERROR_OK;
}
return ERROR_TARGET_NOT_HALTED;
}
- if (info->probed == 0)
+ if (!info->probed)
return ERROR_FLASH_BANK_NOT_PROBED;
int not_protected = 0;