diff --git a/src/util/inv_mpu.c b/src/util/inv_mpu.c index 0410390..b6f25ee 100644 --- a/src/util/inv_mpu.c +++ b/src/util/inv_mpu.c @@ -94,6 +94,14 @@ static inline int reg_int_cb(struct int_param_s *int_param) //static int set_int_enable(unsigned char enable); +// cf. https://github.com/NicHub/mpu9250-esp32 +#ifndef min +#define min(X,Y) (((X) < (Y)) ? (X) : (Y)) +#endif +#ifndef max +#define max(X,Y) (((X) > (Y)) ? (X) : (Y)) +#endif + /* Hardware registers needed by driver. */ struct gyro_reg_s { unsigned char who_am_i;