INSAT Mini Project

Dependencies:   ST_INTERFACES X_NUCLEO_COMMON

Fork of X_NUCLEO_6180XA1 by ST

Files at this revision

API Documentation at this revision

Comitter:
mapellil
Date:
Mon Nov 09 15:37:48 2015 +0000
Parent:
30:75bf50276881
Child:
32:ef97c377d27b
Commit message:
Added Doxygen doc

Changed in this revision

Components/VL6180X/vl6180x_class.h Show annotated file Show diff for this revision Revisions of this file
--- a/Components/VL6180X/vl6180x_class.h	Mon Nov 09 09:38:34 2015 +0000
+++ b/Components/VL6180X/vl6180x_class.h	Mon Nov 09 15:37:48 2015 +0000
@@ -127,10 +127,15 @@
     
    /** Destructor
     */
-    virtual ~VL6180X(){} 
+    virtual ~VL6180X(){}     
     /* warning: VL6180X class inherits from GenericSensor, RangeSensor and LightSensor, that haven`t a destructor.
        The warning should request to introduce a virtual destructor to make sure to delete the object */
-		
+
+	/*** Interface Methods ***/	
+	/**
+	 * @brief       PowerOn the sensor
+	 * @return      void
+	 */		
     /* turns on the sensor */		 
     void VL6180x_On(void)
     {
@@ -139,7 +144,11 @@
        else if(expgpio0) 
 	  *expgpio0=1;
     } 
-		
+
+	/**
+	 * @brief       PowerOff the sensor
+	 * @return      void
+	 */		
     /* turns off the sensor */
     void VL6180x_Off(void) 
     {
@@ -148,39 +157,78 @@
        else if(expgpio0) 
 	  *expgpio0=0;			
     }
-		
+    
+	/**
+	 * @brief       Initialize the sensor with default values
+	 * @return      0 on Success
+	 */					 
     int InitSensor(uint8_t NewAddr);
+    
+	/**
+	 * @brief       Start the measure indicated by operating mode
+	 * @param[in]   operating_mode specifies requested measure 
+	 * @param[in]   fptr specifies call back function in case of interrupt measure	 
+	 * @param[in]   low specifies measure low threashold
+	 * @param[in]   high specifies measure high threashold	 
+	 * @return      0 on Success
+	 */					     
     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);
 
-    /* handling functions of the interrupt_measure */
-		
-    /** Attach a function to call when an interrupt is detected, i.e. measurement is ready
-     *
-     *  @param[in] fptr A pointer to a void function, or 0 to set as none
-     */
+	/**
+	 * @brief       Get results for the measure indicated by operating mode
+	 * @param[in]   operating_mode specifies requested measure results
+	 * @param[out]  Data pointer to the MeasureData_t structure to read data in to
+	 * @return      0 on Success
+	 */					         
+    int GetMeasurement(OperatingMode operating_mode, MeasureData_t *Data);		
+
+	/**
+	 * @brief       Stop the currently running measure indicate by operating_mode
+	 * @param[in]   operating_mode specifies requested measure to stop
+	 * @return      0 on Success
+	 */					             
+    int StopMeasurement(OperatingMode operating_mode);
+     
+	/**
+	 * @brief       Attach a function to call when an interrupt is detected, i.e. measurement is ready
+	 * @param[in]   fptr pointer to call back function to be called whenever an interrupt occours
+	 * @return      0 on Success
+	 */					                  
     void AttachInterruptMeasureDetectionIRQ(void (*fptr)(void))
     {
        interrupt_measure.rise(fptr);
     }
 
-    /** Enable interrupt measure IRQ
-     */
+	/**
+	 * @brief       Enable interrupt measure IRQ
+	 * @return      0 on Success
+	 */					     
     void EnableInterruptMeasureDetectionIRQ(void) 
     {
        interrupt_measure.enable_irq();
     }
 
-    /** Disable interrupt measure IRQ
-     */
+	/**
+	 * @brief       Disable interrupt measure IRQ
+	 * @return      0 on Success
+	 */					          
     void DisableInterruptMeasureDetectionIRQ(void) 
     {
        interrupt_measure.disable_irq();
     }
-		
+    
+	/**
+	 * @brief       Interrupt handling func to be called by user after an INT is occourred
+	 * @param[in]   opeating_mode indicating the in progress measure
+	 * @param[out]  Data pointer to the MeasureData_t structure to read data in to
+	 * @return      0 on Success
+	 */					          		
     int HandleIRQ(OperatingMode operating_mode, MeasureData_t *Data);
-		
+
+	/**
+	 * @brief       Check the sensor presence
+	 * @return      1 when device is present
+	 */						
     unsigned Present()
     {
        return Device->Present;