diff --git a/NexTouch.cpp b/NexTouch.cpp index a42dec8..c35a462 100644 --- a/NexTouch.cpp +++ b/NexTouch.cpp @@ -15,7 +15,7 @@ #include "NexTouch.h" -uint8_t NexTouch::__buffer[256] = {0}; +uint8_t NexTouch::__buffer[NEX_SERIAL_RX_BUFFER_SIZE] = {0}; /** * Watting for Nextion's touch event. diff --git a/NexTouch.h b/NexTouch.h index c957f51..dc74f04 100644 --- a/NexTouch.h +++ b/NexTouch.h @@ -19,6 +19,8 @@ #include #include "NexSerialConfig.h" +#define NEX_SERIAL_RX_BUFFER_SIZE (64) + typedef uint8_t NexPid; typedef uint8_t NexCid; @@ -89,7 +91,7 @@ private: /* methods */ void pop(void); private: /* static data */ - static uint8_t __buffer[256]; + static uint8_t __buffer[NEX_SERIAL_RX_BUFFER_SIZE]; private: /* data */ NexPid pid; /* Page ID */