Browse Source

Adjust some HAL formatting

Scott Lahteine 6 years ago
parent
commit
8489673cea

+ 2
- 4
Marlin/src/HAL/HAL_STM32F4/EEPROM_Emul/eeprom_emul.cpp View File

103
     case ERASED:
103
     case ERASED:
104
       if (PageStatus1 == VALID_PAGE) { /* Page0 erased, Page1 valid */
104
       if (PageStatus1 == VALID_PAGE) { /* Page0 erased, Page1 valid */
105
           /* Erase Page0 */
105
           /* Erase Page0 */
106
-        if(!EE_VerifyPageFullyErased(PAGE0_BASE_ADDRESS)) {
106
+        if (!EE_VerifyPageFullyErased(PAGE0_BASE_ADDRESS)) {
107
           FlashStatus = HAL_FLASHEx_Erase(&pEraseInit, &SectorError);
107
           FlashStatus = HAL_FLASHEx_Erase(&pEraseInit, &SectorError);
108
           /* If erase operation was failed, a Flash error code is returned */
108
           /* If erase operation was failed, a Flash error code is returned */
109
-          if (FlashStatus != HAL_OK) {
110
-            return FlashStatus;
111
-          }
109
+          if (FlashStatus != HAL_OK) return FlashStatus;
112
         }
110
         }
113
       }
111
       }
114
       else if (PageStatus1 == RECEIVE_DATA) { /* Page0 erased, Page1 receive */
112
       else if (PageStatus1 == RECEIVE_DATA) { /* Page0 erased, Page1 receive */

+ 2
- 4
Marlin/src/HAL/HAL_STM32F7/EEPROM_Emul/eeprom_emul.cpp View File

103
     case ERASED:
103
     case ERASED:
104
       if (PageStatus1 == VALID_PAGE) { /* Page0 erased, Page1 valid */
104
       if (PageStatus1 == VALID_PAGE) { /* Page0 erased, Page1 valid */
105
           /* Erase Page0 */
105
           /* Erase Page0 */
106
-        if(!EE_VerifyPageFullyErased(PAGE0_BASE_ADDRESS)) {
106
+        if (!EE_VerifyPageFullyErased(PAGE0_BASE_ADDRESS)) {
107
           FlashStatus = HAL_FLASHEx_Erase(&pEraseInit, &SectorError);
107
           FlashStatus = HAL_FLASHEx_Erase(&pEraseInit, &SectorError);
108
           /* If erase operation was failed, a Flash error code is returned */
108
           /* If erase operation was failed, a Flash error code is returned */
109
-          if (FlashStatus != HAL_OK) {
110
-            return FlashStatus;
111
-          }
109
+          if (FlashStatus != HAL_OK) return FlashStatus;
112
         }
110
         }
113
       }
111
       }
114
       else if (PageStatus1 == RECEIVE_DATA) { /* Page0 erased, Page1 receive */
112
       else if (PageStatus1 == RECEIVE_DATA) { /* Page0 erased, Page1 receive */

Loading…
Cancel
Save