mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-27 13:56:24 +00:00
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(); ```
This commit is contained in:
parent
6b274e563d
commit
7e36b76af2
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user