浏览代码

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 7 年前
父节点
当前提交
7e36b76af2
共有 1 个文件被更改,包括 5 次插入4 次删除
  1. 5
    4
      Marlin/MarlinSerial.cpp

+ 5
- 4
Marlin/MarlinSerial.cpp 查看文件

@@ -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
 

正在加载...
取消
保存