Adjust some HAL formatting
This commit is contained in:
parent
fb8a07660a
commit
8489673cea
@ -103,12 +103,10 @@ uint16_t EE_Initialize(void) {
|
|||||||
case ERASED:
|
case ERASED:
|
||||||
if (PageStatus1 == VALID_PAGE) { /* Page0 erased, Page1 valid */
|
if (PageStatus1 == VALID_PAGE) { /* Page0 erased, Page1 valid */
|
||||||
/* Erase Page0 */
|
/* Erase Page0 */
|
||||||
if(!EE_VerifyPageFullyErased(PAGE0_BASE_ADDRESS)) {
|
if (!EE_VerifyPageFullyErased(PAGE0_BASE_ADDRESS)) {
|
||||||
FlashStatus = HAL_FLASHEx_Erase(&pEraseInit, &SectorError);
|
FlashStatus = HAL_FLASHEx_Erase(&pEraseInit, &SectorError);
|
||||||
/* If erase operation was failed, a Flash error code is returned */
|
/* If erase operation was failed, a Flash error code is returned */
|
||||||
if (FlashStatus != HAL_OK) {
|
if (FlashStatus != HAL_OK) return FlashStatus;
|
||||||
return FlashStatus;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (PageStatus1 == RECEIVE_DATA) { /* Page0 erased, Page1 receive */
|
else if (PageStatus1 == RECEIVE_DATA) { /* Page0 erased, Page1 receive */
|
||||||
|
@ -103,12 +103,10 @@ uint16_t EE_Initialize(void) {
|
|||||||
case ERASED:
|
case ERASED:
|
||||||
if (PageStatus1 == VALID_PAGE) { /* Page0 erased, Page1 valid */
|
if (PageStatus1 == VALID_PAGE) { /* Page0 erased, Page1 valid */
|
||||||
/* Erase Page0 */
|
/* Erase Page0 */
|
||||||
if(!EE_VerifyPageFullyErased(PAGE0_BASE_ADDRESS)) {
|
if (!EE_VerifyPageFullyErased(PAGE0_BASE_ADDRESS)) {
|
||||||
FlashStatus = HAL_FLASHEx_Erase(&pEraseInit, &SectorError);
|
FlashStatus = HAL_FLASHEx_Erase(&pEraseInit, &SectorError);
|
||||||
/* If erase operation was failed, a Flash error code is returned */
|
/* If erase operation was failed, a Flash error code is returned */
|
||||||
if (FlashStatus != HAL_OK) {
|
if (FlashStatus != HAL_OK) return FlashStatus;
|
||||||
return FlashStatus;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (PageStatus1 == RECEIVE_DATA) { /* Page0 erased, Page1 receive */
|
else if (PageStatus1 == RECEIVE_DATA) { /* Page0 erased, Page1 receive */
|
||||||
|
Loading…
Reference in New Issue
Block a user