From 82130a22cd9fdb0e852fcf0490e2b8e8c12e2b01 Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 6 Jan 2022 18:49:38 +0700 Subject: [PATCH] fix min() type warning --- libraries/SPI/SPI.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/SPI/SPI.cpp b/libraries/SPI/SPI.cpp index c0f23949..916e8671 100644 --- a/libraries/SPI/SPI.cpp +++ b/libraries/SPI/SPI.cpp @@ -208,7 +208,7 @@ void SPIClass::transfer(const void *tx_buf, void *rx_buf, size_t count) while (count) { // each transfer can only up to 64KB (16-bit) bytes - const size_t xfer_len = min(count, UINT16_MAX); + const size_t xfer_len = min(count, (size_t) UINT16_MAX); nrfx_spim_xfer_desc_t xfer_desc = {