General cleanup of HAL code

This commit is contained in:
Scott Lahteine
2018-02-02 03:15:01 -06:00
parent 9b9350e010
commit b13099de3f
4 changed files with 53 additions and 72 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)) { /* nada */ };
while (!TEST(SPSR, SPIF)) { /* nada */ };
SPDR = buf[i];
while (!TEST(SPSR, SPIF)) { /* nada */ };
while (!TEST(SPSR, SPIF)) { /* nada */ };
SPDR = buf[i + 1];
}
while (!TEST(SPSR, SPIF)) { /* nada */ };
while (!TEST(SPSR, SPIF)) { /* nada */ };
SPI.endTransaction();
}