diff options
author | Nick Brassel <nick@tzarc.org> | 2020-04-13 17:09:50 +1000 |
---|---|---|
committer | Florian Didron <fdidron@users.noreply.github.com> | 2020-06-12 17:00:27 +0900 |
commit | 9fe1c38b4c902dadebfd36168db95d9469589aed (patch) | |
tree | dc8c059b129db3adf2e5ef722091921f871f33a6 /tmk_core/protocol | |
parent | da7b76967e08a76e236f4d5a723c9ff1be3f8c6a (diff) |
Fix AVR SPI parameter configuration, remove timeouts due to sync protocol. (#8775)
Diffstat (limited to 'tmk_core/protocol')
-rw-r--r-- | tmk_core/protocol/lufa/adafruit_ble.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tmk_core/protocol/lufa/adafruit_ble.cpp b/tmk_core/protocol/lufa/adafruit_ble.cpp index 764475510d..a9cfc18558 100644 --- a/tmk_core/protocol/lufa/adafruit_ble.cpp +++ b/tmk_core/protocol/lufa/adafruit_ble.cpp @@ -152,7 +152,7 @@ static bool sdep_send_pkt(const struct sdep_msg *msg, uint16_t timeout) { bool ready = false; do { - ready = spi_write(msg->type, 100) != SdepSlaveNotReady; + ready = spi_write(msg->type) != SdepSlaveNotReady; if (ready) { break; } @@ -165,7 +165,7 @@ static bool sdep_send_pkt(const struct sdep_msg *msg, uint16_t timeout) { if (ready) { // Slave is ready; send the rest of the packet - spi_transmit(&msg->cmd_low, sizeof(*msg) - (1 + sizeof(msg->payload)) + msg->len, 100); + spi_transmit(&msg->cmd_low, sizeof(*msg) - (1 + sizeof(msg->payload)) + msg->len); success = true; } @@ -205,7 +205,7 @@ static bool sdep_recv_pkt(struct sdep_msg *msg, uint16_t timeout) { do { // Read the command type, waiting for the data to be ready - msg->type = spi_read(100); + msg->type = spi_read(); if (msg->type == SdepSlaveNotReady || msg->type == SdepSlaveOverflow) { // Release it and let it initialize spi_stop(); @@ -215,11 +215,11 @@ static bool sdep_recv_pkt(struct sdep_msg *msg, uint16_t timeout) { } // Read the rest of the header - spi_receive(&msg->cmd_low, sizeof(*msg) - (1 + sizeof(msg->payload)), 100); + spi_receive(&msg->cmd_low, sizeof(*msg) - (1 + sizeof(msg->payload))); // and get the payload if there is any if (msg->len <= SdepMaxPayload) { - spi_receive(msg->payload, msg->len, 100); + spi_receive(msg->payload, msg->len); } success = true; break; |