Thundersoft / Mbed OS VL6180XA1_for_TT_Mxx
Revision:
1:46408c6b6d96
Parent:
0:293917667c17
Child:
2:8343c9a07b66
--- a/VL6180XA1/VL6180X/VL6180X.cpp	Thu Mar 21 09:19:56 2019 +0000
+++ b/VL6180XA1/VL6180X/VL6180X.cpp	Fri Mar 22 05:59:20 2019 +0000
@@ -1,5 +1,5 @@
 #include <VL6180X.h>
-#include "dm_platform.h"
+//#include "dm_platform.h"
 #include "common_define.h"
 // Defines /////////////////////////////////////////////////////////////////////
 
@@ -10,6 +10,7 @@
 // RANGE_SCALER values for 1x, 2x, 3x scaling - see STSW-IMG003 core/src/vl6180x_api.c (ScalerLookUP[])
 static uint16_t const ScalerValues[] = {0, 253, 127, 84};
 
+#define constrain(amt,low,high) ((amt)<=(low)?(low):((amt)>(high)?(high):(amt)))
 // Constructors ////////////////////////////////////////////////////////////////
 
 VL6180X::VL6180X(I2C *_i2c)