update LIDARLite_v3HP just to be functionnal. IUT GEII NICE
Embed:
(wiki syntax)
Show/hide line numbers
LIDARLite_v3HP.h
00001 /*------------------------------------------------------------------------------ 00002 00003 LIDARLite_v3HP Arduino Library 00004 LIDARLite_v3HP_v3HP.h 00005 00006 This library provides quick access to all the basic functions of LIDAR-Lite 00007 via the Arduino interface. Additionally, it can provide a user of any 00008 platform with a template for their own application code. 00009 00010 Copyright (c) 2018 Garmin Ltd. or its subsidiaries. 00011 00012 Licensed under the Apache License, Version 2.0 (the "License"); 00013 you may not use this file except in compliance with the License. 00014 You may obtain a copy of the License at 00015 00016 http://www.apache.org/licenses/LICENSE-2.0 00017 00018 Unless required by applicable law or agreed to in writing, software 00019 distributed under the License is distributed on an "AS IS" BASIS, 00020 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00021 See the License for the specific language governing permissions and 00022 limitations under the License. 00023 00024 ------------------------------------------------------------------------------*/ 00025 #ifndef LIDARLite_v3HP_h 00026 #define LIDARLite_v3HP_h 00027 00028 #define LIDARLITE_ADDR_DEFAULT 0x62 00029 00030 #include <cstdint> 00031 #include "mbed.h" 00032 00033 class LIDARLite_v3HP 00034 { 00035 00036 public: 00037 00038 uint8_t addr_; 00039 I2C *i2c_; 00040 00041 LIDARLite_v3HP(I2C *i2c); 00042 LIDARLite_v3HP(I2C *i2c, uint8_t &addr); 00043 00044 //virtual ~LIDARLite_v3HP(); 00045 00046 void configure (const uint8_t &configuration = 0, const uint8_t &lidarliteAddress = LIDARLITE_ADDR_DEFAULT); 00047 void setI2Caddr (const uint8_t &newAddress, uint8_t &disableDefault, const uint8_t &lidarliteAddress = LIDARLITE_ADDR_DEFAULT); 00048 uint16_t readDistance(const uint8_t &lidarliteAddress = LIDARLITE_ADDR_DEFAULT); 00049 void waitForBusy (const uint8_t &lidarliteAddress = LIDARLITE_ADDR_DEFAULT); 00050 uint8_t getBusyFlag (const uint8_t &lidarliteAddress = LIDARLITE_ADDR_DEFAULT); 00051 void takeRange (const uint8_t &lidarliteAddress = LIDARLITE_ADDR_DEFAULT); 00052 void resetReferenceFilter (const uint8_t &lidarliteAddress = LIDARLITE_ADDR_DEFAULT); 00053 00054 void write (const uint8_t ®Addr, uint8_t * dataBytes,const uint16_t &numBytes, const uint8_t &lidarliteAddress = LIDARLITE_ADDR_DEFAULT); 00055 void read (const uint8_t ®Addr, uint8_t * dataBytes,const uint16_t &numBytes, const uint8_t &lidarliteAddress = LIDARLITE_ADDR_DEFAULT); 00056 00057 void correlationRecordToSerial (const uint16_t &numberOfReadings = 1024,const uint8_t &lidarliteAddress = LIDARLITE_ADDR_DEFAULT); 00058 00059 private: 00060 00061 }; 00062 00063 #endif
Generated on Sun Jul 24 2022 00:03:47 by 1.7.2