summaryrefslogtreecommitdiff
path: root/tmk_core
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2020-04-13 17:09:50 +1000
committerGitHub <noreply@github.com>2020-04-13 17:09:50 +1000
commit46e449376163779413b74f81e320a7d7bbd7e13b (patch)
tree8bd54b95a66d0f2db3a01ce137b3e6bba5ba6f8d /tmk_core
parent157d121c71104abb564643f7b6152d149c01fc20 (diff)
Fix AVR SPI parameter configuration, remove timeouts due to sync protocol. (#8775)
Diffstat (limited to 'tmk_core')
-rw-r--r--tmk_core/protocol/lufa/adafruit_ble.cpp10
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 f04ab757ea..b07407f387 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;