From cb57ec9c02ffebe5abeba266eb9eaa3dfc2089d3 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 27 Nov 2022 02:05:04 +0000 Subject: Revert lib/usbhost changes (#19165) --- lib/usbhost/USB_Host_Shield_2.0/SPP.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/usbhost/USB_Host_Shield_2.0/SPP.cpp') diff --git a/lib/usbhost/USB_Host_Shield_2.0/SPP.cpp b/lib/usbhost/USB_Host_Shield_2.0/SPP.cpp index 8169707661..0f4ee5e981 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 >= ARRAY_SIZE(sppOutputBuffer)) + if(sppIndex >= sizeof (sppOutputBuffer) / sizeof (sppOutputBuffer[0])) 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 } -- cgit v1.2.3