From b9b0d2f4f29714db29a360d1926aca54a182802d Mon Sep 17 00:00:00 2001 From: Giampaolo Mancini Date: Fri, 1 Sep 2023 15:28:07 +0200 Subject: [PATCH] Increase buffer size for more capable boards --- src/BearSSLClient.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/BearSSLClient.h b/src/BearSSLClient.h index 700bb9a..1d54e5c 100644 --- a/src/BearSSLClient.h +++ b/src/BearSSLClient.h @@ -25,6 +25,18 @@ #ifndef _BEAR_SSL_CLIENT_H_ #define _BEAR_SSL_CLIENT_H_ +#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_OPTA) || defined(ARDUINO_GIGA) + +#ifndef BEAR_SSL_CLIENT_OBUF_SIZE +#define BEAR_SSL_CLIENT_OBUF_SIZE 2048 +#endif + +#ifndef BEAR_SSL_CLIENT_IBUF_SIZE +#define BEAR_SSL_CLIENT_IBUF_SIZE 32768 +#endif + +#else + #ifndef BEAR_SSL_CLIENT_OBUF_SIZE #define BEAR_SSL_CLIENT_OBUF_SIZE 512 + 85 #endif @@ -33,6 +45,8 @@ #define BEAR_SSL_CLIENT_IBUF_SIZE 8192 + 85 + 325 - BEAR_SSL_CLIENT_OBUF_SIZE #endif +#endif + #ifndef BEAR_SSL_CLIENT_CHAIN_SIZE #define BEAR_SSL_CLIENT_CHAIN_SIZE 3 #endif