Makes the VL53L0X library compatible with MAX32630FTHR definitions. Adjusts default sensor settings to fastest reading (20ms) vs. default (30ms).
Dependencies: ST_INTERFACES X_NUCLEO_COMMON
Fork of VL53L0X by
Revision 5:d25feb417ac1, committed 2018-03-13
- Comitter:
- DVLevine
- Date:
- Tue Mar 13 01:23:22 2018 +0000
- Parent:
- 4:d25c4fa216af
- Commit message:
- changed library for compatibility with MAX32630 definitions and changed prox mode to fast readings (20ms) vs. default long distance setting (33ms).
Changed in this revision
STMPE1600/Stmpe1600.h | Show annotated file Show diff for this revision Revisions of this file |
VL53L0X.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r d25c4fa216af -r d25feb417ac1 STMPE1600/Stmpe1600.h --- a/STMPE1600/Stmpe1600.h Mon Dec 18 08:27:21 2017 +0000 +++ b/STMPE1600/Stmpe1600.h Tue Mar 13 01:23:22 2018 +0000 @@ -86,7 +86,7 @@ typedef enum { INPUT = 0, OUTPUT, - NOT_CONNECTED + NOT_CONNECTED_prox } ExpGpioPinDirection; /* Classes -------------------------------------------------------------------*/ @@ -300,7 +300,7 @@ */ bool set_gpio_dir(ExpGpioPinName pin_name, ExpGpioPinDirection pin_dir) { - if (pin_name == NOT_CON || pin_dir == NOT_CONNECTED) { + if (pin_name == NOT_CON || pin_dir == NOT_CONNECTED_prox) { return true; } gpdr0_15 = gpdr0_15 & (~((uint16_t) 0x0001 << pin_name)); // clear the Pin
diff -r d25c4fa216af -r d25feb417ac1 VL53L0X.cpp --- a/VL53L0X.cpp Mon Dec 18 08:27:21 2017 +0000 +++ b/VL53L0X.cpp Tue Mar 13 01:23:22 2018 +0000 @@ -5368,11 +5368,11 @@ //* // switch(rangingConfig) { // case LONG_RANGE: - signalLimit = (FixPoint1616_t)(0.1 * 65536); +/* signalLimit = (FixPoint1616_t)(0.1 * 65536); sigmaLimit = (FixPoint1616_t)(60 * 65536); timingBudget = 33000; preRangeVcselPeriod = 18; - finalRangeVcselPeriod = 14; + finalRangeVcselPeriod = 14; */ /* break; case HIGH_ACCURACY: signalLimit = (FixPoint1616_t)(0.25*65536); @@ -5381,13 +5381,13 @@ preRangeVcselPeriod = 14; finalRangeVcselPeriod = 10; break; - case HIGH_SPEED: + case HIGH_SPEED: */ signalLimit = (FixPoint1616_t)(0.25*65536); sigmaLimit = (FixPoint1616_t)(32*65536); timingBudget = 20000; preRangeVcselPeriod = 14; finalRangeVcselPeriod = 10; - break; + /* break; default: debug_printf("Not Supported"); }