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;
|
tx_buffer.buffer[tx_buffer.head] = c;
|
||||||
CRITICAL_SECTION_START;
|
{ CRITICAL_SECTION_START;
|
||||||
tx_buffer.head = i;
|
tx_buffer.head = i;
|
||||||
SBI(M_UCSRxB, M_UDRIEx);
|
SBI(M_UCSRxB, M_UDRIEx);
|
||||||
CRITICAL_SECTION_END;
|
CRITICAL_SECTION_END;
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue