From ac33a1208e98d58389b256a3e6b7dbb035ac6b1c Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Mon, 17 Jul 2023 10:09:13 -0700 Subject: [PATCH] boardd: use full buffer size old-commit-hash: d2fa746b12afb73d1b22f5c867938f49d9c34e08 --- selfdrive/boardd/panda_comms.h | 2 +- selfdrive/boardd/spi.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/selfdrive/boardd/panda_comms.h b/selfdrive/boardd/panda_comms.h index 1410759783..c102642e59 100644 --- a/selfdrive/boardd/panda_comms.h +++ b/selfdrive/boardd/panda_comms.h @@ -14,7 +14,7 @@ #define TIMEOUT 0 -#define SPI_BUF_SIZE 1024 +#define SPI_BUF_SIZE 2048 // comms base class diff --git a/selfdrive/boardd/spi.cc b/selfdrive/boardd/spi.cc index 6b15b25c01..7e6e579b7a 100644 --- a/selfdrive/boardd/spi.cc +++ b/selfdrive/boardd/spi.cc @@ -163,7 +163,7 @@ int PandaSpiHandle::bulk_read(unsigned char endpoint, unsigned char* data, int l } int PandaSpiHandle::bulk_transfer(uint8_t endpoint, uint8_t *tx_data, uint16_t tx_len, uint8_t *rx_data, uint16_t rx_len, unsigned int timeout) { - const int xfer_size = 0x40 * 15; + const int xfer_size = SPI_BUF_SIZE - 0x40; int ret = 0; uint16_t length = (tx_data != NULL) ? tx_len : rx_len;