mbed library for STMicroelectronics' X-NUCLEO-IKA01A1 expansion board.

Dependents:   HelloWorld_IKA01A1

Fork of X_NUCLEO_IKA01A1 by ST Expansion SW Team

Library for STMicroelectronics' X-NUCLEO-IKA01A1 multifunctional expansion board based on operational amplifiers.

Revision:
13:9cecc8d66cc1
Parent:
12:ac16b9a1cad6
Child:
14:8277ca0ab13a
diff -r ac16b9a1cad6 -r 9cecc8d66cc1 Components/tsu104/tsu104_class.h
--- a/Components/tsu104/tsu104_class.h	Thu Apr 07 04:15:34 2016 +0000
+++ b/Components/tsu104/tsu104_class.h	Thu Apr 07 07:51:13 2016 +0000
@@ -77,7 +77,9 @@
 /* Classes -------------------------------------------------------------------*/
 
 /**
- * @brief Class representing a TSU104 component.
+ * @brief Class representing a TSU104 operational amplifier component. The window comparator 
+ * configuration allows the user to compare a signal to two threshold voltages. When the signal
+ * is out of the required voltage range, the output of the operational amplifier toggles
  */
 class TSU104 : public Windcomp
 {
@@ -108,48 +110,50 @@
 
 	/*** Public Component Related Methods ***/
 
-	/* ACTION 5 --------------------------------------------------------------*
-	 * Implement here the component's public methods, as wrappers of the C    *
-	 * component's functions.                                                 *
-	 * They should be:                                                        *
-	 *   + Methods with the same name of the C component's virtual table's    *
-	 *     functions (1);                                                     *
-	 *   + Methods with the same name of the C component's extended virtual   *
-	 *     table's functions, if any (2).                                     *
-	 *                                                                        *
-	 * Example:                                                               *
-	 *   virtual int GetValue(float *f)  //(1)                                *
-	 *   {                                                                    *
-	 *     return COMPONENT_GetValue(float *f);                               *
-	 *   }                                                                    *
-	 *                                                                        *
-	 *   virtual int EnableFeature(void) //(2)                                *
-	 *   {                                                                    *
-	 *     return COMPONENT_EnableFeature();                                  *
-	 *   }                                                                    *
-	 *------------------------------------------------------------------------*/
+	/**
+	 * @brief initialize the class for TSU104 operational amplifier component
+	 * @retval COMPONENT_OK if initialization is successfull
+	 * @retval suitable error code otherwise	 
+	 */	
 	virtual int Init(void *init = NULL)
 	{
 		return (int) TSU104_Init((void *) init);
 	}
-
+	
+	/**
+	 * @brief  obtain component ID for TSU104 perational amplifier
+	 * @retval component ID for TSU104 operational amplifier
+	 */		
 	virtual int ReadID(uint8_t *id = NULL)
 	{
 		return (int) TSU104_ReadID((uint8_t *) id);
 	}
-
+	/**
+	 * @brief  obtain digital value at arduino pin D2
+	 * @retval digital value at arduino pin D2
+	 */	
 	virtual unsigned int TSU104_WindComp_Get_D2(void)
 	{
 		DigitalIn windowsCompD2(D2);
 		return windowsCompD2.read();
 	}
 
+	/**
+	 * @brief  obtain digital value at arduino pin D4
+	 * @retval digital value at arduino pin D4
+	 */		
 	virtual unsigned int TSU104_WindComp_Get_D4(void)
 	{
 		DigitalIn windowsCompD4(D4);
 		return windowsCompD4.read();
 	}
-
+	
+	
+	/**
+	 * @brief  obtain the output voltage detected by photo sensor
+	 * @param  pin AnalogIn pin to use for detecting the voltage
+	 * @retval voltage detected by photo sensor
+	 */		
 	virtual unsigned int TSU104_PhotoSensor_GetVoltage(PinName pin)
 	{
 		AnalogIn photoSensor(pin);