Pārlūkot izejas kodu

Repair MarlinSerial with TX-buffer

These '{' are important to avoid the redefinition of `unsigned char _sreg = SREG;`
at the same level.
Used in
```
#define CRITICAL_SECTION_START  unsigned char _sreg = SREG; cli();
```
AnHardt 8 gadus atpakaļ
vecāks
revīzija
7e36b76af2
1 mainītis faili ar 5 papildinājumiem un 4 dzēšanām
  1. 5
    4
      Marlin/MarlinSerial.cpp

+ 5
- 4
Marlin/MarlinSerial.cpp Parādīt failu

@@ -244,10 +244,11 @@ void MarlinSerial::flush(void) {
244 244
     }
245 245
 
246 246
     tx_buffer.buffer[tx_buffer.head] = c;
247
-    CRITICAL_SECTION_START;
248
-      tx_buffer.head = i;
249
-      SBI(M_UCSRxB, M_UDRIEx);
250
-    CRITICAL_SECTION_END;
247
+    { CRITICAL_SECTION_START;
248
+        tx_buffer.head = i;
249
+        SBI(M_UCSRxB, M_UDRIEx);
250
+      CRITICAL_SECTION_END;
251
+    }
251 252
     return;
252 253
   }
253 254
 

Notiek ielāde…
Atcelt
Saglabāt