Skip to content

Commit 82130a2

Browse files
committed
fix min() type warning
1 parent 4760493 commit 82130a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/SPI/SPI.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ void SPIClass::transfer(const void *tx_buf, void *rx_buf, size_t count)
208208
while (count)
209209
{
210210
// each transfer can only up to 64KB (16-bit) bytes
211-
const size_t xfer_len = min(count, UINT16_MAX);
211+
const size_t xfer_len = min(count, (size_t) UINT16_MAX);
212212

213213
nrfx_spim_xfer_desc_t xfer_desc =
214214
{

0 commit comments

Comments
 (0)