Skip to content

Commit

Permalink
fix min() type warning
Browse files Browse the repository at this point in the history
  • Loading branch information
hathach committed Jan 6, 2022
1 parent 4760493 commit 82130a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/SPI/SPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
{
Expand Down

0 comments on commit 82130a2

Please sign in to comment.