use VL6180XA1 chip wothout X-NUCLEO-6180XA1 Board. Simple way to use the chip.

Dependents:   Check_VL6180XA1_ToF

Fork of X_NUCLEO_6180XA1 by ST

Revision:
58:1e9a3a46f814
Parent:
57:fa4c622b04a7
--- a/Components/VL6180X/VL6180X.cpp	Mon Mar 13 19:08:10 2017 +0000
+++ b/Components/VL6180X/VL6180X.cpp	Mon Aug 21 15:44:34 2017 +0000
@@ -2611,7 +2611,7 @@
    {    
       memcpy(tmp+sizeof(RegisterAddr), pBuffer, NumByteToWrite);
    }
-   ret = _dev_i2c.write(WriteDeviceAddr, (const char*)tmp, NumByteToWrite+sizeof(RegisterAddr), false);
+   ret = _dev_i2c->write(WriteDeviceAddr, (const char*)tmp, NumByteToWrite+sizeof(RegisterAddr), false);
  
    if(ret) 
       return -1;
@@ -2631,12 +2631,12 @@
    *(((uint8_t*)&myRegisterAddrBE)+1) = (uint8_t)myRegisterAddr;
     
    /* Send 8 bits device address and 16 bits register address in BE format, with no STOP condition */
-   ret = _dev_i2c.write(ReadDeviceAddr, (const char*)&myRegisterAddrBE, sizeof(RegisterAddr), true);
+   ret = _dev_i2c->write(ReadDeviceAddr, (const char*)&myRegisterAddrBE, sizeof(RegisterAddr), true);
    if(!ret) 
    {
       ReadDeviceAddr|=0x001;
       /* Read data, with STOP condition  */
-      ret = _dev_i2c.read(ReadDeviceAddr, (char*)tmp, NumByteToRead, false);
+      ret = _dev_i2c->read(ReadDeviceAddr, (char*)tmp, NumByteToRead, false);
    }    
    if(ret) 
       return -1;