From c554a70b233a9e3492af0a5d54542d4b401e6904 Mon Sep 17 00:00:00 2001 From: Jason2866 <24528715+Jason2866@users.noreply.github.com> Date: Tue, 21 Dec 2021 12:19:32 +0100 Subject: [PATCH] fix redefine warning with Arduino Core 3.0.x --- lib/lib_i2c/mlx90640-library/MLX90640_API.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/lib_i2c/mlx90640-library/MLX90640_API.cpp b/lib/lib_i2c/mlx90640-library/MLX90640_API.cpp index 8b1822bf4..f2a8731c3 100644 --- a/lib/lib_i2c/mlx90640-library/MLX90640_API.cpp +++ b/lib/lib_i2c/mlx90640-library/MLX90640_API.cpp @@ -42,7 +42,9 @@ int MLX90640_I2CRead(uint8_t addr, uint32_t reg, uint16_t len, uint16_t *reg_dat int MLX90640_I2CWrite(uint8_t _deviceAddress, unsigned int writeAddress, uint16_t data); // I2C -#define I2C_BUFFER_LENGTH 128 +#ifndef I2C_BUFFER_LENGTH + #define I2C_BUFFER_LENGTH 128 +#endif int MLX90640_I2CRead(uint8_t addr, uint32_t reg, uint16_t len, uint16_t *reg_data){ int bytesRemaining = len * 2;