From a017f0f31159df7eaa4ca21fb6de75bf02553638 Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Sun, 14 Jan 2018 15:21:27 +0100 Subject: [PATCH] Cast return type of sizeof on the ESP8266 and ESP32 --- settings.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/settings.h b/settings.h index 48372aef..7f473409 100644 --- a/settings.h +++ b/settings.h @@ -156,6 +156,10 @@ e-mail : support@circuitsathome.com #include <../../../../hardware/pic32/libraries/SPI/SPI.h> // Hack to use the SPI library #endif +#if defined(ESP8266) || defined(ESP32) +#define MFK_CASTUINT8T (uint8_t) // ESP return type for sizeof needs casting to uint8_t +#endif + #ifdef STM32F4 #include "stm32f4xx_hal.h" extern SPI_HandleTypeDef SPI_Handle; // Needed to be declared in your main.cpp