From 4db9e23b36f85ee83a8d915326b1fa1b64e7de12 Mon Sep 17 00:00:00 2001 From: Elliot Matson <1711604+elliotmatson@users.noreply.github.com> Date: Mon, 26 Dec 2022 13:29:46 -0600 Subject: [PATCH] Fix compiler complaining about parentheses I was getting this error when using Arduino as an ESP-IDF component, this fix cleared it up `suggest parentheses around '-' in operand of '&' [-Werror=parentheses]` --- src/ESP32-HUB75-MatrixPanel-I2S-DMA.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ESP32-HUB75-MatrixPanel-I2S-DMA.cpp b/src/ESP32-HUB75-MatrixPanel-I2S-DMA.cpp index fd7ae93..fd0ab2d 100644 --- a/src/ESP32-HUB75-MatrixPanel-I2S-DMA.cpp +++ b/src/ESP32-HUB75-MatrixPanel-I2S-DMA.cpp @@ -19,7 +19,7 @@ static const char* TAG = "MatrixPanel"; * Irrelevant for ESP32-S2 the way the FIFO ordering works is different - refer to page 679 of S2 technical reference manual */ #if defined (ESP32_THE_ORIG) - #define ESP32_TX_FIFO_POSITION_ADJUST(x_coord) ((x_coord & 1U) ? (x_coord-1):(x_coord+1)) + #define ESP32_TX_FIFO_POSITION_ADJUST(x_coord) (((x_coord) & 1U) ? (x_coord-1):(x_coord+1)) #else #define ESP32_TX_FIFO_POSITION_ADJUST(x_coord) x_coord #endif