diff options
Diffstat (limited to 'lib/usbhost/USB_Host_Shield_2.0/SPP.cpp')
-rw-r--r-- | lib/usbhost/USB_Host_Shield_2.0/SPP.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/usbhost/USB_Host_Shield_2.0/SPP.cpp b/lib/usbhost/USB_Host_Shield_2.0/SPP.cpp index 0f4ee5e981..8169707661 100644 --- a/lib/usbhost/USB_Host_Shield_2.0/SPP.cpp +++ b/lib/usbhost/USB_Host_Shield_2.0/SPP.cpp @@ -757,7 +757,7 @@ size_t SPP::write(const uint8_t *data, size_t size) { void SPP::write(const uint8_t *data, size_t size) { #endif for(uint8_t i = 0; i < size; i++) { - if(sppIndex >= sizeof (sppOutputBuffer) / sizeof (sppOutputBuffer[0])) + if(sppIndex >= ARRAY_SIZE(sppOutputBuffer)) send(); // Send the current data in the buffer sppOutputBuffer[sppIndex++] = data[i]; // All the bytes are put into a buffer and then send using the send() function } |