doxygen: Added documentation for servo base and es08a
authorKiveisha Yevgeniy <yevgeniy.kiveisha@intel.com>
Mon, 9 Jun 2014 16:00:07 +0000 (16:00 +0000)
committerKiveisha Yevgeniy <yevgeniy.kiveisha@intel.com>
Mon, 9 Jun 2014 16:00:07 +0000 (16:00 +0000)
Signed-off-by: Kiveisha Yevgeniy <yevgeniy.kiveisha@intel.com>
examples/es08a.cxx
src/servo/es08a.h
src/servo/servo.h

index c82bb25..81cdb9b 100644 (file)
@@ -43,6 +43,7 @@ sig_handler(int signo)
 int
 main(int argc, char **argv)
 {
+    //! [Interesting]
     upm::ES08A *servo = new upm::ES08A(5);
 
     signal(SIGINT, sig_handler);
@@ -59,6 +60,7 @@ main(int argc, char **argv)
             clock -= 10;
         }
     }
+    //! [Interesting]
 
     std::cout << "exiting application" << std::endl;
 
index c17dbc6..4ac3bd6 100644 (file)
@@ -31,9 +31,26 @@ namespace upm {
 #define MIN_PULSE_WIDTH      600
 #define MAX_PULSE_WIDTH      2500
 
+/**
+ * @brief C++ API for ES08A servo component
+ *
+ * This file defines the ES08A C++ interface for libes08a
+ *
+ * @snippet es08a.cxx Interesting
+ *
+ */
 class ES08A : public Servo {
     public:
+        /**
+         * Instanciates a ES08A object
+         *
+         * @param pin servo pin number
+         */
         ES08A (int pin);
+
+        /**
+         * ES08A object destructor.
+         */
         ~ES08A ();
 };
 
index 430a496..5b500be 100644 (file)
@@ -35,12 +35,46 @@ namespace upm {
 #define HIGH                  1
 #define LOW                   0
 
+/**
+ * @brief Base class for other servo components
+ *
+ * PMOD pins for MAX44000PMB1 board
+ *
+ */
 class Servo {
     public:
+        /**
+         * Instanciates a servo object
+         *
+         * @param pin servo pin number
+         */
         Servo (int pin);
+
+        /**
+         * Servo object destructor.
+         */
         ~Servo();
+
+        /**
+         * Set the of the servo engine.
+         *
+         * X = between (MIN_PULSE_WIDTH , MAX_PULSE_WIDTH)
+         *
+         * X usec
+         * _______
+         *        |_______________________________________
+         *                      20000 usec
+         *
+         * Max period can be only 7968750(nses) which is ~8(msec)
+         * so the servo will not work as expected.
+         *
+         * @param angle number between 0 and 180
+         */
         maa_result_t setAngle (int angle);
 
+        /**
+         * Return name of the component
+         */
         std::string name()
         {
             return m_name;