Przeglądaj źródła

Adjust some HAL formatting

Scott Lahteine 6 lat temu
rodzic
commit
8489673cea

+ 2
- 4
Marlin/src/HAL/HAL_STM32F4/EEPROM_Emul/eeprom_emul.cpp Wyświetl plik

@@ -103,12 +103,10 @@ uint16_t EE_Initialize(void) {
103 103
     case ERASED:
104 104
       if (PageStatus1 == VALID_PAGE) { /* Page0 erased, Page1 valid */
105 105
           /* Erase Page0 */
106
-        if(!EE_VerifyPageFullyErased(PAGE0_BASE_ADDRESS)) {
106
+        if (!EE_VerifyPageFullyErased(PAGE0_BASE_ADDRESS)) {
107 107
           FlashStatus = HAL_FLASHEx_Erase(&pEraseInit, &SectorError);
108 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 112
       else if (PageStatus1 == RECEIVE_DATA) { /* Page0 erased, Page1 receive */

+ 2
- 4
Marlin/src/HAL/HAL_STM32F7/EEPROM_Emul/eeprom_emul.cpp Wyświetl plik

@@ -103,12 +103,10 @@ uint16_t EE_Initialize(void) {
103 103
     case ERASED:
104 104
       if (PageStatus1 == VALID_PAGE) { /* Page0 erased, Page1 valid */
105 105
           /* Erase Page0 */
106
-        if(!EE_VerifyPageFullyErased(PAGE0_BASE_ADDRESS)) {
106
+        if (!EE_VerifyPageFullyErased(PAGE0_BASE_ADDRESS)) {
107 107
           FlashStatus = HAL_FLASHEx_Erase(&pEraseInit, &SectorError);
108 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 112
       else if (PageStatus1 == RECEIVE_DATA) { /* Page0 erased, Page1 receive */

Ładowanie…
Anuluj
Zapisz