From 90824f935eef3f19037a019d1d970d697a2caf9a Mon Sep 17 00:00:00 2001 From: Andrei Aldea <7153954+Grippy98@users.noreply.github.com> Date: Sat, 23 Mar 2019 15:34:38 -0400 Subject: [PATCH 1/2] Added ESP32 Min Definition As far as I can tell the otherwise is otherwise 100% ESP32 Compatible --- src/util/inv_mpu.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/util/inv_mpu.c b/src/util/inv_mpu.c index 0410390..17357cc 100644 --- a/src/util/inv_mpu.c +++ b/src/util/inv_mpu.c @@ -24,6 +24,11 @@ #include #include "inv_mpu.h" +#ifdef ESP32 +#define min(a,b) ((a)<(b)?(a):(b)) +#endif + + /* The following functions must be defined for this platform: * i2c_write(unsigned char slave_addr, unsigned char reg_addr, * unsigned char length, unsigned char const *data) From 68f29cf54b2e91477dee19a60d1a25b000b1b5d9 Mon Sep 17 00:00:00 2001 From: Pierce Nichols Date: Sun, 22 Sep 2019 17:29:48 -0700 Subject: [PATCH 2/2] Added definition of min() for ESP8266 --- src/util/inv_mpu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util/inv_mpu.c b/src/util/inv_mpu.c index 17357cc..79b89d9 100644 --- a/src/util/inv_mpu.c +++ b/src/util/inv_mpu.c @@ -28,6 +28,9 @@ #define min(a,b) ((a)<(b)?(a):(b)) #endif +#ifdef ESP8266 +#define min(a,b) ((a)<(b)?(a):(b)) +#endif /* The following functions must be defined for this platform: * i2c_write(unsigned char slave_addr, unsigned char reg_addr,