Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: VL6180XA1/VL6180X/VL6180X.cpp
- 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)