Fix the "slow" version of the G-code parser

This commit is contained in:
Bob-the-Kuhn
2018-01-29 16:45:44 -06:00
committed by Scott Lahteine
parent c251601916
commit 21179f8300
4 changed files with 23 additions and 18 deletions

View File

@ -91,12 +91,12 @@ void spiSendBlock(uint8_t token, const uint8_t* buf) {
SPI.beginTransaction(spiConfig);
SPDR = token;
for (uint16_t i = 0; i < 512; i += 2) {
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
while (!TEST(SPSR, SPIF)) { /* nada */ };
SPDR = buf[i];
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
while (!TEST(SPSR, SPIF)) { /* nada */ };
SPDR = buf[i + 1];
}
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
while (!TEST(SPSR, SPIF)) { /* nada */ };
SPI.endTransaction();
}