diff options
author | Devaev Maxim <[email protected]> | 2020-11-12 18:33:35 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-11-12 18:33:35 +0300 |
commit | 0140cba0dcc983e7649f407059636d26727f110f (patch) | |
tree | f28c9fffdc12ef7d5d204958e3ce3857ef4ab260 /hid | |
parent | 55a682803965af9bc4712cb7485a706bd2b25832 (diff) |
software cs
Diffstat (limited to 'hid')
-rw-r--r-- | hid/src/main.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/hid/src/main.cpp b/hid/src/main.cpp index 3d0eb618..9111474d 100644 --- a/hid/src/main.cpp +++ b/hid/src/main.cpp @@ -171,8 +171,7 @@ ISR(SPI_STC_vect) { if (spi_out[0] && spi_out_index < 4) { // digitalWrite(4, !digitalRead(4)); SPDR = spi_out[spi_out_index]; - bool err = (SPSR & (1 << WCOL)); - if (!err) { + if (!(SPSR & (1 << WCOL))) { ++spi_out_index; if (spi_out_index == 4) { spi_out_index = 0; @@ -274,12 +273,12 @@ void loop() { } } # elif defined(CMD_SPI) - if (SPSR & (1 << WCOL)) { + /*if (SPSR & (1 << WCOL)) { digitalWrite(3, HIGH); uint8_t _ = SPDR; delay(1); digitalWrite(3, LOW); - } + }*/ if (spiReady()) { sendCmdResponse(handleCmdBuffer(spi_in)); } |