Files
Loongson_2k0300_SmartCar/lib/vl53l0x.h
T

29 lines
387 B
C++

#ifndef VL53L0X_H
#define VL53L0X_H
#include <cstdint>
extern "C" {
#include "vl53l0x_platform.h"
}
class VL53L0X
{
public:
VL53L0X();
~VL53L0X();
bool init();
bool startMeasure();
bool readResult(VL53L0X_RangingMeasurementData_t &data);
bool readRange(VL53L0X_RangingMeasurementData_t &data);
bool stop();
private:
int fd;
bool initialized;
vl53l0x_dev_t dev;
};
#endif