The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Revision:
122:f9eeca106725
Parent:
65:5798e58a58b1
diff -r 6c34061e7c34 -r f9eeca106725 analogin_api.h
--- a/analogin_api.h	Wed May 25 16:44:06 2016 +0100
+++ b/analogin_api.h	Thu Jul 07 14:34:11 2016 +0100
@@ -24,12 +24,39 @@
 extern "C" {
 #endif
 
+/** Analogin hal structure. analogin_s is declared in the target's hal
+ */
 typedef struct analogin_s analogin_t;
 
-void     analogin_init    (analogin_t *obj, PinName pin);
-float    analogin_read    (analogin_t *obj);
+/**
+ * \defgroup hal_analogin Analogin hal functions
+ * @{
+ */
+
+/** Initialize the analogin peripheral
+ *
+ * Configures the pin used by analogin.
+ * @param obj The analogin object to initialize
+ * @param pin The analogin pin name
+ */
+void analogin_init(analogin_t *obj, PinName pin);
+
+/** Read the input voltage, represented as a float in the range [0.0, 1.0]
+ *
+ * @param obj The analogin object
+ * @return A floating value representing the current input voltage
+ */
+float analogin_read(analogin_t *obj);
+
+/** Read the value from analogin pin, represented as an unsigned 16bit value
+ *
+ * @param obj The analogin object
+ * @return An unsigned 16bit value representing the current input voltage
+ */
 uint16_t analogin_read_u16(analogin_t *obj);
 
+/**@}*/
+
 #ifdef __cplusplus
 }
 #endif