From 7e36b76af2b31ef1a37a004abe09e35d983c2ab4 Mon Sep 17 00:00:00 2001
From: AnHardt <github@kitelab.de>
Date: Mon, 22 Aug 2016 23:40:09 +0200
Subject: [PATCH] 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();
```
---
 Marlin/MarlinSerial.cpp | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/Marlin/MarlinSerial.cpp b/Marlin/MarlinSerial.cpp
index e550f00daf..a1b3349fec 100644
--- a/Marlin/MarlinSerial.cpp
+++ b/Marlin/MarlinSerial.cpp
@@ -244,10 +244,11 @@ void MarlinSerial::flush(void) {
     }
 
     tx_buffer.buffer[tx_buffer.head] = c;
-    CRITICAL_SECTION_START;
-      tx_buffer.head = i;
-      SBI(M_UCSRxB, M_UDRIEx);
-    CRITICAL_SECTION_END;
+    { CRITICAL_SECTION_START;
+        tx_buffer.head = i;
+        SBI(M_UCSRxB, M_UDRIEx);
+      CRITICAL_SECTION_END;
+    }
     return;
   }