28 #include <mraa/i2c.hpp> 30 #define ADDR 0x62 // device address 33 #define ACQ_COMMAND 0x00 // Device Command 34 #define STATUS 0x01 // System Status 35 #define SIG_COUNT_VAL 0x02 // Maximum Acquisition Count 36 #define ACQ_CONFIG_REG 0x04 // Acquisition Mode Control 37 #define VELOCITY 0x09 // Velocity measurement output 38 #define PEAK_CORR 0x0C // Peak value in correlation record 39 #define NOISE_PEAK 0x0D // Correaltion record noise floor 40 #define SIGNAL_STRENGTH 0x0E // Received signal strength 41 #define FULL_DELAY_HIGH 0x0F // Distance measurement high byte 42 #define FULL_DELAY_LOW 0x10 // Distance measurement low byte 43 #define OUTER_LOOP_COUNT 0x11 // Burst measurement count conttrol 44 #define REF_COUNT_VAL 0x12 // Reference acquisition count 45 #define LAST_DELAY_HIGH 0x14 // Previous distance measurement high byte 46 #define LAST_DELAY_LOW 0x15 // Previous distance measurement low byte 47 #define UNIT_ID_HIGH 0x16 // Serial number high byte 48 #define UNIT_ID_LOW 0x17 // Serial number low byte 49 #define I2C_ID_HIGH 0x18 // Write serial number high byte for I2C address unclock 50 #define I2C_ID_LOW 0x19 // Write serial number low byte for I2X address unlock 51 #define I2C_SEC_ADDR 0x1A // Write new I2C address after unlock 52 #define THRESHOLD_BYPASS 0x1C // Peak detection threshold bypass 53 #define I2C_CONFIG 0x1E // Default address response control 54 #define COMMAND 0x40 // State command 55 #define MEASURE_DELAY 0x45 // Delay between automatic measurements 56 #define PEAK_BCK 0x4C // Second largest peak value on correlation record 57 #define CORR_DATA 0x52 // Correlation record data lo byte 58 #define CORR_DATA_SIGN 0x53 // Correlation record data high byte 59 #define ACQ_SETTINGS 0x5D // Correaltion record memory bank select 60 #define POWER_CONTROL 0x65 // Power state control 122 uint16_t
read(
int reg,
bool monitorBusyFlag);
152 mraa::Result
i2cWriteReg (uint8_t reg, uint8_t value);
159 mraa::I2c m_i2ControlCtx;
uint16_t read(int reg, bool monitorBusyFlag)
Definition: lidarlitev3.cxx:59
API for the LIDARLITEV3 Optical Distance Measurement Sensor.
Definition: lidarlitev3.hpp:90
int getDistance()
Definition: lidarlitev3.cxx:50
C++ API wrapper for the bh1749 driver.
Definition: a110x.hpp:29
mraa::Result i2cWriteReg(uint8_t reg, uint8_t value)
Definition: lidarlitev3.cxx:124
LIDARLITEV3(int bus, int devAddr=ADDR)
Definition: lidarlitev3.cxx:36
uint16_t i2cReadReg_16(int reg)
Definition: lidarlitev3.cxx:98
uint8_t i2cReadReg_8(int reg)
Definition: lidarlitev3.cxx:113
std::string name()
Definition: lidarlitev3.hpp:127