takuya ichise / TI_VL53L0X

Dependencies:   vl53l0x_api

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers TI_VL53L0X.h Source File

TI_VL53L0X.h

00001 #ifndef MBED_TI_VL53L0X_H
00002 #define MBED_TI_VL53L0X_H
00003 
00004 #include "mbed.h"
00005 #include "vl53l0x_api.h"
00006 #include "vl53l0x_i2c_platform.h"
00007 #include "vl53l0x_platform.h"
00008 
00009 /**
00010  * LPC1768用
00011  */
00012 class TI_VL53L0X
00013 {
00014 public:
00015     TI_VL53L0X();
00016 
00017     void printPalState(VL53L0X_State state);
00018     void printPalError(VL53L0X_Error status);
00019     void printRangeStatus(
00020         VL53L0X_RangingMeasurementData_t *pRangingMeasurementData);
00021     VL53L0X_Error waitMeasurementDataReady(VL53L0X_DEV dev);
00022     VL53L0X_Error waitStopCompleted(VL53L0X_DEV dev);
00023 
00024     void setup();
00025     void calibration();
00026     void stopMeasurement();
00027     void startMeasurement();
00028     int getMeasurement();
00029 
00030 private:
00031   VL53L0X_State apiState;
00032   VL53L0X_Error status;
00033   VL53L0X_Dev_t myDevice;
00034   VL53L0X_Dev_t *pMyDevice;
00035 };
00036 
00037 #endif
00038