Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of X_NUCLEO_6180XA1 by
Components/VL6180X/vl6180x_class.h@7:2dc81120c917, 2015-09-25 (annotated)
- Committer:
- gallonm
- Date:
- Fri Sep 25 12:12:51 2015 +0200
- Revision:
- 7:2dc81120c917
- Parent:
- 4:a5abf7757947
- Child:
- 8:f943a1fca15f
update files
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
gallonm | 1:1de1ea2994d9 | 1 | /** |
gallonm | 1:1de1ea2994d9 | 2 | ****************************************************************************** |
gallonm | 1:1de1ea2994d9 | 3 | * @file vl6180x_class.h |
gallonm | 1:1de1ea2994d9 | 4 | * @author AST / EST |
gallonm | 1:1de1ea2994d9 | 5 | * @version V0.0.1 |
gallonm | 1:1de1ea2994d9 | 6 | * @date 14-April-2015 |
gallonm | 1:1de1ea2994d9 | 7 | * @brief Header file for component VL6180X |
gallonm | 1:1de1ea2994d9 | 8 | ****************************************************************************** |
gallonm | 1:1de1ea2994d9 | 9 | * @attention |
gallonm | 1:1de1ea2994d9 | 10 | * |
gallonm | 1:1de1ea2994d9 | 11 | * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> |
gallonm | 1:1de1ea2994d9 | 12 | * |
gallonm | 1:1de1ea2994d9 | 13 | * Redistribution and use in source and binary forms, with or without modification, |
gallonm | 1:1de1ea2994d9 | 14 | * are permitted provided that the following conditions are met: |
gallonm | 1:1de1ea2994d9 | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
gallonm | 1:1de1ea2994d9 | 16 | * this list of conditions and the following disclaimer. |
gallonm | 1:1de1ea2994d9 | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
gallonm | 1:1de1ea2994d9 | 18 | * this list of conditions and the following disclaimer in the documentation |
gallonm | 1:1de1ea2994d9 | 19 | * and/or other materials provided with the distribution. |
gallonm | 1:1de1ea2994d9 | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
gallonm | 1:1de1ea2994d9 | 21 | * may be used to endorse or promote products derived from this software |
gallonm | 1:1de1ea2994d9 | 22 | * without specific prior written permission. |
gallonm | 1:1de1ea2994d9 | 23 | * |
gallonm | 1:1de1ea2994d9 | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
gallonm | 1:1de1ea2994d9 | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
gallonm | 1:1de1ea2994d9 | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
gallonm | 1:1de1ea2994d9 | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
gallonm | 1:1de1ea2994d9 | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
gallonm | 1:1de1ea2994d9 | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
gallonm | 1:1de1ea2994d9 | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
gallonm | 1:1de1ea2994d9 | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
gallonm | 1:1de1ea2994d9 | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
gallonm | 1:1de1ea2994d9 | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
gallonm | 1:1de1ea2994d9 | 34 | * |
gallonm | 1:1de1ea2994d9 | 35 | ****************************************************************************** |
gallonm | 1:1de1ea2994d9 | 36 | */ |
gallonm | 1:1de1ea2994d9 | 37 | |
gallonm | 1:1de1ea2994d9 | 38 | #ifndef __VL6180X_CLASS_H |
gallonm | 1:1de1ea2994d9 | 39 | #define __VL6180X_CLASS_H |
gallonm | 1:1de1ea2994d9 | 40 | |
gallonm | 1:1de1ea2994d9 | 41 | /* Includes ------------------------------------------------------------------*/ |
gallonm | 1:1de1ea2994d9 | 42 | #include "RangeSensor.h" |
gallonm | 1:1de1ea2994d9 | 43 | #include "LightSensor.h" |
gallonm | 4:a5abf7757947 | 44 | #include "DevI2C.h" //temporaneo fino alla creazione della classe x_nucleo_6180xa1 |
gallonm | 1:1de1ea2994d9 | 45 | #include "vl6180x_api.h" |
gallonm | 1:1de1ea2994d9 | 46 | #include "vl6180x_cfg.h" |
gallonm | 1:1de1ea2994d9 | 47 | #include "vl6180x_def.h" |
gallonm | 1:1de1ea2994d9 | 48 | #include "vl6180x_types.h" |
gallonm | 1:1de1ea2994d9 | 49 | #include "vl6180x_platform.h" |
gallonm | 1:1de1ea2994d9 | 50 | #include "vl6180x_appcfg.h" |
gallonm | 7:2dc81120c917 | 51 | #include "STMPE1600_class.h" |
gallonm | 1:1de1ea2994d9 | 52 | |
gallonm | 4:a5abf7757947 | 53 | /** default device address */ |
gallonm | 4:a5abf7757947 | 54 | #define DEFAULT_DEVICE_ADDRESS 0x29 |
gallonm | 4:a5abf7757947 | 55 | |
gallonm | 1:1de1ea2994d9 | 56 | /* Classes -------------------------------------------------------------------*/ |
gallonm | 1:1de1ea2994d9 | 57 | /** Class representing a VL6180X sensor component |
gallonm | 1:1de1ea2994d9 | 58 | */ |
gallonm | 7:2dc81120c917 | 59 | class VL6180X : public RangeSensor, public LightSensor |
gallonm | 7:2dc81120c917 | 60 | { |
gallonm | 1:1de1ea2994d9 | 61 | public: |
gallonm | 1:1de1ea2994d9 | 62 | /** Constructor |
gallonm | 1:1de1ea2994d9 | 63 | * @param[in] i2c device I2C to be used for communication |
gallonm | 7:2dc81120c917 | 64 | * @param[in] digital out pin/STMPE1600DigiOut pin to be used for GPIO expander communication |
gallonm | 4:a5abf7757947 | 65 | * @param[in] device address, 0x29 by default |
gallonm | 7:2dc81120c917 | 66 | * @param[in] device id, 0 by default |
gallonm | 1:1de1ea2994d9 | 67 | */ |
gallonm | 7:2dc81120c917 | 68 | |
gallonm | 7:2dc81120c917 | 69 | |
gallonm | 7:2dc81120c917 | 70 | VL6180X(DevI2C &i2c, DigitalOut &pin, uint8_t DevAddr=DEFAULT_DEVICE_ADDRESS) : RangeSensor(), LightSensor(), dev_i2c(i2c), gpio0(&pin) |
gallonm | 7:2dc81120c917 | 71 | { |
gallonm | 7:2dc81120c917 | 72 | MyDeviceAddress=DevAddr; |
gallonm | 7:2dc81120c917 | 73 | Present=0; |
gallonm | 7:2dc81120c917 | 74 | Ready=0; |
gallonm | 7:2dc81120c917 | 75 | } |
gallonm | 7:2dc81120c917 | 76 | |
gallonm | 7:2dc81120c917 | 77 | VL6180X(DevI2C &i2c, STMPE1600DigiOut &pin, uint8_t DevAddr=DEFAULT_DEVICE_ADDRESS) : RangeSensor(), LightSensor(), dev_i2c(i2c), expgpio0(&pin) |
gallonm | 7:2dc81120c917 | 78 | { |
gallonm | 7:2dc81120c917 | 79 | MyDeviceAddress=DevAddr; |
gallonm | 7:2dc81120c917 | 80 | Present=0; |
gallonm | 7:2dc81120c917 | 81 | Ready=0; |
gallonm | 7:2dc81120c917 | 82 | } |
gallonm | 7:2dc81120c917 | 83 | |
gallonm | 4:a5abf7757947 | 84 | |
gallonm | 7:2dc81120c917 | 85 | /** Destructor |
gallonm | 7:2dc81120c917 | 86 | */ |
gallonm | 7:2dc81120c917 | 87 | //~VL6180X(){} |
gallonm | 7:2dc81120c917 | 88 | |
gallonm | 7:2dc81120c917 | 89 | |
gallonm | 7:2dc81120c917 | 90 | void VL6180x_On(void) { |
gallonm | 7:2dc81120c917 | 91 | if (gpio0) *gpio0=1; |
gallonm | 7:2dc81120c917 | 92 | else if (expgpio0) *expgpio0=1; |
gallonm | 7:2dc81120c917 | 93 | } |
gallonm | 7:2dc81120c917 | 94 | |
gallonm | 7:2dc81120c917 | 95 | void VL6180x_Off(void) { |
gallonm | 7:2dc81120c917 | 96 | if (gpio0) *gpio0=0; |
gallonm | 7:2dc81120c917 | 97 | else if (expgpio0) *expgpio0=0; |
gallonm | 7:2dc81120c917 | 98 | } |
gallonm | 7:2dc81120c917 | 99 | //Init sensor accende, legge id, inizializza il dispositivo e prepara per le misure (range, als) |
gallonm | 7:2dc81120c917 | 100 | //altrimenti errore e cancello dalla board |
gallonm | 7:2dc81120c917 | 101 | |
gallonm | 1:1de1ea2994d9 | 102 | /*** Interface Methods ***/ |
gallonm | 7:2dc81120c917 | 103 | /*virtual*/ int Init() |
gallonm | 4:a5abf7757947 | 104 | { |
gallonm | 7:2dc81120c917 | 105 | return VL6180x_InitData(MyDeviceAddress); // ritorna 0 se corretto |
gallonm | 1:1de1ea2994d9 | 106 | } |
gallonm | 3:454541a079f4 | 107 | |
gallonm | 7:2dc81120c917 | 108 | /*virtual*/ int ReadID() |
gallonm | 4:a5abf7757947 | 109 | { |
gallonm | 7:2dc81120c917 | 110 | return VL6180X_ReadID(); // ritorna 0 se corretto e -2 se errore |
gallonm | 1:1de1ea2994d9 | 111 | } |
gallonm | 7:2dc81120c917 | 112 | /* |
gallonm | 7:2dc81120c917 | 113 | |
gallonm | 7:2dc81120c917 | 114 | void SetPresent() |
gallonm | 7:2dc81120c917 | 115 | { |
gallonm | 7:2dc81120c917 | 116 | MyDevice.Present=1; |
gallonm | 7:2dc81120c917 | 117 | } |
gallonm | 7:2dc81120c917 | 118 | |
gallonm | 7:2dc81120c917 | 119 | void SetDeviceID(int n) |
gallonm | 7:2dc81120c917 | 120 | { |
gallonm | 7:2dc81120c917 | 121 | MyDevice.DevID=n; |
gallonm | 7:2dc81120c917 | 122 | } |
gallonm | 7:2dc81120c917 | 123 | |
gallonm | 7:2dc81120c917 | 124 | void SetReady() |
gallonm | 7:2dc81120c917 | 125 | { |
gallonm | 7:2dc81120c917 | 126 | MyDevice.Ready=1; |
gallonm | 7:2dc81120c917 | 127 | } |
gallonm | 7:2dc81120c917 | 128 | |
gallonm | 3:454541a079f4 | 129 | /* |
gallonm | 3:454541a079f4 | 130 | virtual int GetRange(int *piData) { |
gallonm | 3:454541a079f4 | 131 | return VL6180X_GetRange(piData); |
gallonm | 1:1de1ea2994d9 | 132 | } |
gallonm | 1:1de1ea2994d9 | 133 | |
gallonm | 3:454541a079f4 | 134 | virtual int GetLight(int *piData) { |
gallonm | 3:454541a079f4 | 135 | return VL6180X_GetLight(piData); |
gallonm | 3:454541a079f4 | 136 | } |
gallonm | 4:a5abf7757947 | 137 | |
gallonm | 7:2dc81120c917 | 138 | /* api.c functions */ |
gallonm | 7:2dc81120c917 | 139 | int VL6180x_WaitDeviceBooted(VL6180xDev_t dev); |
gallonm | 7:2dc81120c917 | 140 | int VL6180x_InitData(VL6180xDev_t dev ); |
gallonm | 7:2dc81120c917 | 141 | int VL6180x_SetupGPIO1(VL6180xDev_t dev, uint8_t IntFunction, int ActiveHigh); |
gallonm | 7:2dc81120c917 | 142 | int VL6180x_Prepare(VL6180xDev_t dev); |
gallonm | 7:2dc81120c917 | 143 | int VL6180x_RangeStartContinuousMode(VL6180xDev_t dev); |
gallonm | 7:2dc81120c917 | 144 | int VL6180x_RangeStartSingleShot(VL6180xDev_t dev); |
gallonm | 7:2dc81120c917 | 145 | int VL6180x_RangeSetMaxConvergenceTime(VL6180xDev_t dev, uint8_t MaxConTime_msec); |
gallonm | 7:2dc81120c917 | 146 | int VL6180x_RangePollMeasurement(VL6180xDev_t dev, VL6180x_RangeData_t *pRangeData); |
gallonm | 7:2dc81120c917 | 147 | int VL6180x_RangeGetMeasurementIfReady(VL6180xDev_t dev, VL6180x_RangeData_t *pRangeData); |
gallonm | 7:2dc81120c917 | 148 | int VL6180x_RangeGetMeasurement(VL6180xDev_t dev, VL6180x_RangeData_t *pRangeData); |
gallonm | 7:2dc81120c917 | 149 | int VL6180x_RangeGetResult(VL6180xDev_t dev, int32_t *pRange_mm); |
gallonm | 7:2dc81120c917 | 150 | int VL6180x_RangeConfigInterrupt(VL6180xDev_t dev, uint8_t ConfigGpioInt); |
gallonm | 7:2dc81120c917 | 151 | int VL6180x_RangeGetInterruptStatus(VL6180xDev_t dev, uint8_t *pIntStatus); |
gallonm | 7:2dc81120c917 | 152 | int VL6180x_AlsPollMeasurement(VL6180xDev_t dev, VL6180x_AlsData_t *pAlsData); |
gallonm | 7:2dc81120c917 | 153 | int VL6180x_AlsGetMeasurement(VL6180xDev_t dev, VL6180x_AlsData_t *pAlsData); |
gallonm | 7:2dc81120c917 | 154 | int VL6180x_AlsConfigInterrupt(VL6180xDev_t dev, uint8_t ConfigGpioInt); |
gallonm | 7:2dc81120c917 | 155 | int VL6180x_AlsSetIntegrationPeriod(VL6180xDev_t dev, uint16_t period_ms); |
gallonm | 7:2dc81120c917 | 156 | int VL6180x_AlsSetInterMeasurementPeriod(VL6180xDev_t dev, uint16_t intermeasurement_period_ms); |
gallonm | 7:2dc81120c917 | 157 | int VL6180x_AlsSetAnalogueGain(VL6180xDev_t dev, uint8_t gain); |
gallonm | 7:2dc81120c917 | 158 | int VL6180x_AlsSetThresholds(VL6180xDev_t dev, uint8_t low, uint8_t high); |
gallonm | 7:2dc81120c917 | 159 | int VL6180x_AlsGetInterruptStatus(VL6180xDev_t dev, uint8_t *pIntStatus); |
gallonm | 7:2dc81120c917 | 160 | int VL6180x_StaticInit(VL6180xDev_t dev); |
gallonm | 7:2dc81120c917 | 161 | int VL6180x_RangeWaitDeviceReady(VL6180xDev_t dev, int MaxLoop ); |
gallonm | 7:2dc81120c917 | 162 | int VL6180x_RangeSetInterMeasPeriod(VL6180xDev_t dev, uint32_t InterMeasTime_msec); |
gallonm | 7:2dc81120c917 | 163 | int VL6180x_UpscaleSetScaling(VL6180xDev_t dev, uint8_t scaling); |
gallonm | 7:2dc81120c917 | 164 | int VL6180x_UpscaleGetScaling(VL6180xDev_t dev); |
gallonm | 7:2dc81120c917 | 165 | uint16_t VL6180x_GetUpperLimit(VL6180xDev_t dev); |
gallonm | 7:2dc81120c917 | 166 | int VL6180x_RangeSetThresholds(VL6180xDev_t dev, uint16_t low, uint16_t high, int SafeHold); |
gallonm | 7:2dc81120c917 | 167 | int VL6180x_RangeGetThresholds(VL6180xDev_t dev, uint16_t *low, uint16_t *high); |
gallonm | 7:2dc81120c917 | 168 | int VL6180x_RangeSetRawThresholds(VL6180xDev_t dev, uint8_t low, uint8_t high); |
gallonm | 7:2dc81120c917 | 169 | int VL6180x_RangeSetEceFactor(VL6180xDev_t dev, uint16_t FactorM, uint16_t FactorD); |
gallonm | 7:2dc81120c917 | 170 | int VL6180x_RangeSetEceState(VL6180xDev_t dev, int enable ); |
gallonm | 7:2dc81120c917 | 171 | int VL6180x_FilterSetState(VL6180xDev_t dev, int state); |
gallonm | 7:2dc81120c917 | 172 | int VL6180x_FilterGetState(VL6180xDev_t dev); |
gallonm | 7:2dc81120c917 | 173 | int VL6180x_DMaxSetState(VL6180xDev_t dev, int state); |
gallonm | 7:2dc81120c917 | 174 | int VL6180x_DMaxGetState(VL6180xDev_t dev); |
gallonm | 7:2dc81120c917 | 175 | int VL6180x_RangeSetSystemMode(VL6180xDev_t dev, uint8_t mode); |
gallonm | 7:2dc81120c917 | 176 | int8_t VL6180x_GetOffsetCalibrationData(VL6180xDev_t dev); |
gallonm | 7:2dc81120c917 | 177 | void VL6180x_SetOffsetCalibrationData(VL6180xDev_t dev, int8_t offset); |
gallonm | 7:2dc81120c917 | 178 | int VL6180x_SetXTalkCompensationRate(VL6180xDev_t dev, FixPoint97_t Rate); |
gallonm | 7:2dc81120c917 | 179 | int VL6180x_AlsWaitDeviceReady(VL6180xDev_t dev, int MaxLoop ); |
gallonm | 7:2dc81120c917 | 180 | int VL6180x_AlsSetSystemMode(VL6180xDev_t dev, uint8_t mode); |
gallonm | 7:2dc81120c917 | 181 | int VL6180x_SetGroupParamHold(VL6180xDev_t dev, int Hold); |
gallonm | 7:2dc81120c917 | 182 | int VL6180x_SetI2CAddress(VL6180xDev_t dev, uint8_t NewAddr); |
gallonm | 7:2dc81120c917 | 183 | int VL6180x_SetupGPIOx(VL6180xDev_t dev, int pin, uint8_t IntFunction, int ActiveHigh); |
gallonm | 7:2dc81120c917 | 184 | int VL6180x_SetGPIOxPolarity(VL6180xDev_t dev, int pin, int active_high); |
gallonm | 7:2dc81120c917 | 185 | int VL6180x_SetGPIOxFunctionality(VL6180xDev_t dev, int pin, uint8_t functionality); |
gallonm | 7:2dc81120c917 | 186 | int VL6180x_DisableGPIOxOut(VL6180xDev_t dev, int pin); |
gallonm | 7:2dc81120c917 | 187 | int VL6180x_GetInterruptStatus(VL6180xDev_t dev, uint8_t *status); |
gallonm | 7:2dc81120c917 | 188 | int VL6180x_ClearInterrupt(VL6180xDev_t dev, uint8_t IntClear ); |
gallonm | 7:2dc81120c917 | 189 | int VL6180x_RangeStaticInit(VL6180xDev_t dev); |
gallonm | 7:2dc81120c917 | 190 | int VL6180x_UpscaleRegInit(VL6180xDev_t dev); |
gallonm | 7:2dc81120c917 | 191 | int VL6180x_UpscaleStaticInit(VL6180xDev_t dev); |
gallonm | 7:2dc81120c917 | 192 | int VL6180x_AlsGetLux(VL6180xDev_t dev, lux_t *pLux); |
gallonm | 7:2dc81120c917 | 193 | int _UpscaleInitPatch0(VL6180xDev_t dev); |
gallonm | 7:2dc81120c917 | 194 | int VL6180x_RangeGetDeviceReady(VL6180xDev_t dev, int * Ready); |
gallonm | 7:2dc81120c917 | 195 | int VL6180x_RangeSetEarlyConvergenceEestimateThreshold(VL6180xDev_t dev); |
gallonm | 7:2dc81120c917 | 196 | int32_t _GetAveTotalTime(VL6180xDev_t dev); |
gallonm | 7:2dc81120c917 | 197 | int32_t _filter_Start(VL6180xDev_t dev, uint16_t m_trueRange_mm, uint16_t m_rawRange_mm, uint32_t m_rtnSignalRate, uint32_t m_rtnAmbientRate, uint16_t errorCode); |
gallonm | 7:2dc81120c917 | 198 | int _filter_GetResult(VL6180xDev_t dev, VL6180x_RangeData_t *pRangeData); |
gallonm | 7:2dc81120c917 | 199 | int _GetRateResult(VL6180xDev_t dev, VL6180x_RangeData_t *pRangeData); |
gallonm | 7:2dc81120c917 | 200 | int _DMax_InitData(VL6180xDev_t dev); |
gallonm | 7:2dc81120c917 | 201 | |
gallonm | 7:2dc81120c917 | 202 | /* Read functions from registers and write functions into registers */ |
gallonm | 7:2dc81120c917 | 203 | int VL6180X_ReadID(); |
gallonm | 4:a5abf7757947 | 204 | int VL6180X_IO_Read(uint8_t *pBuffer, uint8_t RegisterAddress, uint16_t NumByteToRead); |
gallonm | 4:a5abf7757947 | 205 | |
gallonm | 4:a5abf7757947 | 206 | /* Write and read functions from I2C */ |
gallonm | 4:a5abf7757947 | 207 | int VL6180x_WrByte(VL6180xDev_t dev, uint16_t index, uint8_t data); |
gallonm | 4:a5abf7757947 | 208 | int VL6180x_WrWord(VL6180xDev_t dev, uint16_t index, uint16_t data); |
gallonm | 4:a5abf7757947 | 209 | int VL6180x_WrDWord(VL6180xDev_t dev, uint16_t index, uint32_t data); |
gallonm | 4:a5abf7757947 | 210 | int VL6180x_RdByte(VL6180xDev_t dev, uint16_t index, uint8_t *data); |
gallonm | 4:a5abf7757947 | 211 | int VL6180x_RdWord(VL6180xDev_t dev, uint16_t index, uint16_t *data); |
gallonm | 4:a5abf7757947 | 212 | int VL6180x_RdDWord(VL6180xDev_t dev, uint16_t index, uint32_t *data); |
gallonm | 7:2dc81120c917 | 213 | int VL6180x_UpdateByte(VL6180xDev_t dev, uint16_t index, uint8_t AndData, uint8_t OrData); |
gallonm | 4:a5abf7757947 | 214 | int VL6180x_I2CWrite(uint8_t DeviceAddr, uint16_t RegisterAddr, uint8_t *pBuffer, uint16_t NumByteToWrite); |
gallonm | 4:a5abf7757947 | 215 | int VL6180x_I2CRead(uint8_t DeviceAddr, uint16_t RegisterAddr, uint8_t *pBuffer, uint16_t NumByteToRead); |
gallonm | 7:2dc81120c917 | 216 | |
gallonm | 4:a5abf7757947 | 217 | |
gallonm | 3:454541a079f4 | 218 | private: |
gallonm | 1:1de1ea2994d9 | 219 | /*** Instance Variables ***/ |
gallonm | 1:1de1ea2994d9 | 220 | /* IO Device */ |
gallonm | 7:2dc81120c917 | 221 | DevI2C &dev_i2c; |
gallonm | 7:2dc81120c917 | 222 | DigitalOut *gpio0; |
gallonm | 7:2dc81120c917 | 223 | STMPE1600DigiOut *expgpio0; |
gallonm | 3:454541a079f4 | 224 | |
gallonm | 7:2dc81120c917 | 225 | VL6180xDev_t MyDeviceAddress; |
gallonm | 7:2dc81120c917 | 226 | unsigned Present; |
gallonm | 7:2dc81120c917 | 227 | unsigned Ready; |
gallonm | 1:1de1ea2994d9 | 228 | |
gallonm | 1:1de1ea2994d9 | 229 | }; |
gallonm | 1:1de1ea2994d9 | 230 | |
gallonm | 4:a5abf7757947 | 231 | #endif // __VL6180X_CLASS_H |