Browse Source

Merge pull request #4688 from AnHardt/crittical_section

Repair MarlinSerial with TX-buffer
pull/1/head
Scott Lahteine 8 years ago
committed by GitHub
parent
commit
13e337ac4b
  1. 9
      Marlin/MarlinSerial.cpp

9
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;
}

Loading…
Cancel
Save