VL53L3 Shield specific functions.
Dependents: 53L3A2_Ranging X_NUCLEO_53L3CX
Diff: XNucleo53LX.h
- Revision:
- 1:8afec488fa83
- Parent:
- 0:ba15439f45dd
- Child:
- 2:81763ffd2222
--- a/XNucleo53LX.h Fri Oct 16 15:11:45 2020 +0000 +++ b/XNucleo53LX.h Fri Oct 16 15:43:08 2020 +0000 @@ -45,7 +45,7 @@ #include <vl53lx_class.h> #include "Stmpe1600.h" //#include "DevI2C.h" -#include "vl53L1x_I2c.h" +#include "vl53L3_I2c.h" /** New device addresses */ @@ -72,7 +72,7 @@ /** Constructor 1 * @param[in] &i2c device I2C to be used for communication */ - XNucleo53LX(vl53L1X_DevI2C *ext_i2c) : dev_i2c(ext_i2c) + XNucleo53LX(vl53L3_DevI2C *ext_i2c) : dev_i2c(ext_i2c) { printf("XNucleo53LX %d z\n",ext_i2c); @@ -97,7 +97,7 @@ * @param[in] PinName gpio1_left Mbed DigitalOut pin name to be used as a left sensor GPIO_1 INT * @param[in] PinName gpio1_right Mbed DigitalOut pin name to be used as a right sensor GPIO_1 INT */ - XNucleo53LX(vl53L1X_DevI2C *ext_i2c, PinName gpio1_centre, + XNucleo53LX(vl53L3_DevI2C *ext_i2c, PinName gpio1_centre, PinName gpio1_left, PinName gpio1_right) : dev_i2c(ext_i2c) { stmpe1600_exp0 = new Stmpe1600((DevI2C*)ext_i2c, (0x43 * 2)); // U21 @@ -159,7 +159,7 @@ * @param[in] &i2c device I2C to be used for communication * @return Pointer to the object instance */ - static XNucleo53LX *instance(vl53L1X_DevI2C *ext_i2c); + static XNucleo53LX *instance(vl53L3_DevI2C *ext_i2c); /** * @brief Creates a singleton object instance @@ -169,7 +169,7 @@ * @param[in] PinName gpio1_right the pin connected to right sensor INT * @return Pointer to the object instance */ - static XNucleo53LX *instance(vl53L1X_DevI2C *ext_i2c, PinName gpio1_centre, + static XNucleo53LX *instance(vl53L3_DevI2C *ext_i2c, PinName gpio1_centre, PinName gpio1_left, PinName gpio1_right); /** @@ -178,7 +178,7 @@ */ int init_board(); - vl53L1X_DevI2C *dev_i2c; + vl53L3_DevI2C *dev_i2c; VL53LX *sensor_centre; VL53LX *sensor_left; VL53LX *sensor_right;