Modified for compatibility with Rev.E. hardware

Fork of AkmSensor by AKM Development Platform

Revision:
23:50c98b286e41
Parent:
13:d008249f0359
Child:
34:1ea3357c8d9a
diff -r f44f1018081e -r 50c98b286e41 ak9750ctrl.h
--- a/ak9750ctrl.h	Mon Apr 10 23:02:52 2017 +0000
+++ b/ak9750ctrl.h	Thu Apr 13 22:15:54 2017 +0000
@@ -5,14 +5,20 @@
 #include "akmsensor.h"
 #include "AK9750.h"
 
+/**
+ * Class for handling commands issued to the AK9750/AK9753.
+ */
 class Ak9750Ctrl : public AkmSensor
 {
 
 public:
 
+    /**
+     * Device Sub-IDs.
+     */
     typedef enum {
-        SUB_ID_AK9750              = 0x01,
-        SUB_ID_AK9753              = 0x03,
+        SUB_ID_AK9750              = 0x01,      /**< AK9750: ID = 01h */
+        SUB_ID_AK9753              = 0x03,      /**< AK9753: ID = 03h */
     } SubIdIrSensor;
 
     /**
@@ -26,15 +32,72 @@
      *
      */
     virtual ~Ak9750Ctrl();
+    
+    /**
+     * Process for intializing the selected sensor.
+     *
+     * @return Termination status type for debugging purposes.
+     */
     virtual AkmSensor::Status init(const uint8_t id, const uint8_t subid);
+    
+    /**
+     * Simple flag process to determine if an event has occurred.
+     *
+     * @return TRUE if event has occurred, FALSE if not.
+     */
     virtual bool isEvent();
+    
+    /**
+     * Process abstraction for starting sensor operation.
+     *
+     * @return Termination status type for debugging purposes.
+     */
     virtual AkmSensor::Status startSensor();
+    
+    /**
+     * Process abstraction for starting sensor operation.
+     *
+     * @param sec Number of seconds of operation.
+     * @return Termination status type for debugging purposes.
+     */
     virtual AkmSensor::Status startSensor(const float sec);
+    
+    /**
+     * Process abstraction for stopping sensor operation.
+     *
+     * @return Termination status type for debugging purposes.
+     */
     virtual AkmSensor::Status stopSensor();
+    
+    /**
+     * Process abstraction for reading data from the sensor.
+     *
+     * @param msg Message object that will hold the sensor data.
+     * @return Termination status type for debugging purposes.
+     */
     virtual AkmSensor::Status readSensorData(Message* msg);
-    virtual AkmSensor::Status requestCommand(Message* in, Message* out);
+    
+    /**
+     * Primary process for interfacing a sensor with the AKDP.  When implemented
+     * in sensor class, it will transfer commands between the the sensor control
+     * class and AkmSensorManager. 
+     *
+     * @param in Command message to be processed by sensor.
+     * @param out Message returned from sensor.
+     * @return Termination status type for debugging purposes.
+     */
+    virtual Status requestCommand(Message* in, Message* out);
+    
+    /**
+     * Get the name of the sensor in char format.
+     *
+     * @return Sensor name as a char array.
+     */
     virtual char* getSensorName();
 
+    /**
+     * Causes a detecting of an interrupt by setting the event flag.
+     */
     void detectINT();
 
 private: