INSAT Mini Project

Dependencies:   ST_INTERFACES X_NUCLEO_COMMON

Fork of X_NUCLEO_6180XA1 by ST

Revision:
24:025afc3fe30f
Parent:
23:dfb5ccc7b780
Child:
26:db0cdc5ecc0a
--- a/Components/VL6180X/vl6180x_class.h	Fri Oct 30 11:35:36 2015 +0100
+++ b/Components/VL6180X/vl6180x_class.h	Mon Nov 02 14:02:53 2015 +0100
@@ -145,7 +145,7 @@
     }
 		
     int InitSensor(uint8_t NewAddr);
-    int StartMeasurement(OperatingMode operating_mode, void (*fptr)(void), MeasureData_t *Data, uint16_t low, uint16_t high);
+    int StartMeasurement(OperatingMode operating_mode, void (*fptr)(void), uint16_t low, uint16_t high);
     int GetMeasurement(OperatingMode operating_mode, MeasureData_t *Data);		
     int StopMeasurement(OperatingMode operating_mode);
 
@@ -277,7 +277,7 @@
        return VL6180x_AlsSetAnalogueGain(Device, gain);
     }
 		
-    int AlsSetThresholds(uint8_t low, uint8_t high)
+    int AlsSetThresholds(uint16_t low, uint16_t high)
     {
        return VL6180x_AlsSetThresholds(Device, low, high);
     }
@@ -446,6 +446,11 @@
     {
        return VL6180x_AlsSetSystemMode(Device, MODE_START_STOP|MODE_CONTINUOUS);
     }
+    
+    int AlsStartSingleShot()
+    {
+       return VL6180x_AlsSetSystemMode(Device, MODE_START_STOP|MODE_SINGLESHOT);
+    }
 		
  private:		
     /* api.h functions */
@@ -468,7 +473,7 @@
     int VL6180x_AlsSetIntegrationPeriod(VL6180xDev_t dev, uint16_t period_ms);
     int VL6180x_AlsSetInterMeasurementPeriod(VL6180xDev_t dev,  uint16_t intermeasurement_period_ms);
     int VL6180x_AlsSetAnalogueGain(VL6180xDev_t dev, uint8_t gain);
-    int VL6180x_AlsSetThresholds(VL6180xDev_t dev, uint8_t low, uint8_t high);
+    int VL6180x_AlsSetThresholds(VL6180xDev_t dev, uint16_t low, uint16_t high);
     int VL6180x_AlsGetInterruptStatus(VL6180xDev_t dev, uint8_t *pIntStatus);
     int VL6180x_StaticInit(VL6180xDev_t dev);
     int VL6180x_RangeWaitDeviceReady(VL6180xDev_t dev, int MaxLoop );
@@ -549,8 +554,8 @@
     int AlsSetHighThreshold(uint16_t threshold);
     int GetRangeError(MeasureData_t *Data, VL6180x_RangeData_t RangeData);
     int GetAlsError(MeasureData_t *Data, VL6180x_AlsData_t AlsData);
-    int RangeMeasPollSingleShot(MeasureData_t *Data);
-    int AlsMeasPollSingleShot(MeasureData_t *Data);		
+    int RangeMeasPollSingleShot();
+    int AlsMeasPollSingleShot();		
     int RangeMeasPollContinuousMode();	
     int AlsMeasPollContinuousMode();
     int AlsGetMeasurementIfReady(VL6180xDev_t dev, VL6180x_AlsData_t *pAlsData);