mirror of https://github.com/ARMmbed/mbed-os.git
Add a separate error code for runtime/intergrity-check failures
parent
8396aafb5a
commit
02738b7af6
|
@ -42,6 +42,7 @@ extern "C" {
|
||||||
#define ARM_STORAGE_ERROR_NOT_ERASABLE (ARM_DRIVER_ERROR_SPECIFIC - 1) ///< Part (or all) of the range provided to Erase() isn't erasable.
|
#define ARM_STORAGE_ERROR_NOT_ERASABLE (ARM_DRIVER_ERROR_SPECIFIC - 1) ///< Part (or all) of the range provided to Erase() isn't erasable.
|
||||||
#define ARM_STORAGE_ERROR_NOT_PROGRAMMABLE (ARM_DRIVER_ERROR_SPECIFIC - 2) ///< Part (or all) of the range provided to ProgramData() isn't programmable.
|
#define ARM_STORAGE_ERROR_NOT_PROGRAMMABLE (ARM_DRIVER_ERROR_SPECIFIC - 2) ///< Part (or all) of the range provided to ProgramData() isn't programmable.
|
||||||
#define ARM_STORAGE_ERROR_PROTECTED (ARM_DRIVER_ERROR_SPECIFIC - 3) ///< Part (or all) of the range to Erase() or ProgramData() is protected.
|
#define ARM_STORAGE_ERROR_PROTECTED (ARM_DRIVER_ERROR_SPECIFIC - 3) ///< Part (or all) of the range to Erase() or ProgramData() is protected.
|
||||||
|
#define ARM_STORAGE_ERROR_RUNTIME_OR_INTEGRITY_FAILURE (ARM_DRIVER_ERROR_SPECIFIC - 4) ///< Runtime or sanity-check failure.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Attributes of the storage range within a storage block.
|
* \brief Attributes of the storage range within a storage block.
|
||||||
|
|
|
@ -591,7 +591,7 @@ static int32_t executeCommand(struct mtd_k64f_data *context)
|
||||||
return ARM_DRIVER_ERROR_PARAMETER;
|
return ARM_DRIVER_ERROR_PARAMETER;
|
||||||
}
|
}
|
||||||
if (failedWithRunTimeError()) {
|
if (failedWithRunTimeError()) {
|
||||||
return ARM_DRIVER_ERROR; /* unspecified runtime error. */
|
return ARM_STORAGE_ERROR_RUNTIME_OR_INTEGRITY_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* signal synchronous completion. */
|
/* signal synchronous completion. */
|
||||||
|
@ -638,7 +638,7 @@ static void ftfe_ccie_irq_handler(void)
|
||||||
}
|
}
|
||||||
if (failedWithRunTimeError()) {
|
if (failedWithRunTimeError()) {
|
||||||
if (context->commandCompletionCallback) {
|
if (context->commandCompletionCallback) {
|
||||||
context->commandCompletionCallback(ARM_DRIVER_ERROR, context->currentCommand);
|
context->commandCompletionCallback(ARM_STORAGE_ERROR_RUNTIME_OR_INTEGRITY_FAILURE, context->currentCommand);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue