We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d66a30d commit 7ab53deCopy full SHA for 7ab53de
wled00/wled_serial.cpp
@@ -15,10 +15,11 @@ enum class AwaProtocol {
15
};
16
17
// static data buffer for the loop
18
+#define MAX_BUFFER 2048
19
20
void handleSerial()
21
{
- static uint8_t buffer[4096];
22
+ static uint8_t buffer[MAX_BUFFER];
23
static AwaProtocol state = AwaProtocol::HEADER_A;
24
static uint8_t CRC = 0;
25
static uint16_t count = 0;
@@ -30,7 +31,7 @@ void handleSerial()
30
31
static uint8_t inputColorB = 0;
32
33
uint16_t bufferPointer = 0;
- uint16_t internalIndex = min(Serial.available(), 4096);
34
+ uint16_t internalIndex = min(Serial.available(), MAX_BUFFER);
35
36
if (internalIndex > 0)
37
internalIndex = Serial.readBytes(buffer, internalIndex);
0 commit comments