Skip to content

Commit a9da08a

Browse files
committed
fix issue with blitFrameBuffer not working on Adafruit CLUE (HT @jimsbugs)
1 parent b8e2b61 commit a9da08a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libraries/SPI/SPI.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,13 @@ void SPIClass::transfer(const void *tx_buf, void *rx_buf, size_t count)
207207

208208
while (count)
209209
{
210+
#ifdef _VARIANT_CLUE52840_
211+
// each transfer can only up to 64KB (16-bit) bytes
212+
const size_t xfer_len = min(count, UINT16_MAX);
213+
#else
210214
// each transfer can only up to 64KB (16-bit) bytes
211215
const size_t xfer_len = min((uint16_t) count, UINT16_MAX);
216+
#endif
212217

213218
nrfx_spim_xfer_desc_t xfer_desc =
214219
{

0 commit comments

Comments
 (0)