modified to work with MultiTech mDot on UDK2.0

Dependents:   HelloWorld_53L0A1 unh-hackathon-example unh-hackathon-example-raw

Fork of X_NUCLEO_53L0A1 by ST

Files at this revision

API Documentation at this revision

Comitter:
Mike Fiore
Date:
Sat Apr 08 08:57:03 2017 -0400
Parent:
10:997a796f17c2
Commit message:
implement pure virtual functions

Changed in this revision

Components/VL53L0X/vl53l0x_class.cpp Show annotated file Show diff for this revision Revisions of this file
Components/VL53L0X/vl53l0x_class.h Show annotated file Show diff for this revision Revisions of this file
diff -r 997a796f17c2 -r ff6857189608 Components/VL53L0X/vl53l0x_class.cpp
--- a/Components/VL53L0X/vl53l0x_class.cpp	Sat Apr 08 03:53:52 2017 +0000
+++ b/Components/VL53L0X/vl53l0x_class.cpp	Sat Apr 08 08:57:03 2017 -0400
@@ -5042,6 +5042,10 @@
 		
     return -1;
 }
+
+int VL53L0X::read_id(uint8_t  *id) {
+    return ReadID(id);
+}
  
  
 VL53L0X_Error VL53L0X::WaitMeasurementDataReady(VL53L0X_DEV Dev)
diff -r 997a796f17c2 -r ff6857189608 Components/VL53L0X/vl53l0x_class.h
--- a/Components/VL53L0X/vl53l0x_class.h	Sat Apr 08 03:53:52 2017 +0000
+++ b/Components/VL53L0X/vl53l0x_class.h	Sat Apr 08 08:57:03 2017 -0400
@@ -491,6 +491,11 @@
        return VL53L0X_DataInit(Device);
     }
 
+    virtual int init(void * NewAddr)
+    {  
+       return Init(NewAddr);
+    }
+
 /**
  * @brief Configure GPIO1 function and set polarity.
  * @par Function Description
@@ -699,6 +704,11 @@
         StopMeasurement(range_single_shot_polling);
         return status;
     }
+
+    virtual int get_distance(uint32_t *piData)
+    {
+	return GetDistance(piData);
+    }
 		
 /**
  * @brief Configure ranging interrupt reported to application
@@ -1333,6 +1343,7 @@
 
     /* Read function of the ID device */
     virtual int ReadID(uint8_t *id);
+    virtual int read_id(uint8_t *id);
     
     VL53L0X_Error WaitMeasurementDataReady(VL53L0X_DEV Dev);
     VL53L0X_Error WaitStopCompleted(VL53L0X_DEV Dev);