Modified for compatibility with Rev.E. hardware

Fork of AkmSensor by AKM Development Platform

Revision:
19:8dcc4f323bdc
Parent:
18:b7182d5ad8d5
Child:
20:2fca76521680
--- a/akmakd.h	Tue Feb 21 23:46:12 2017 +0000
+++ b/akmakd.h	Wed Feb 22 18:47:01 2017 +0000
@@ -24,6 +24,12 @@
         SUB_ID_AK09918              = 0x11,  // 17
     } SubIdAkd;
     
+    typedef enum {
+        INTERRUPT_DISABLED          = 0x00, // Polling
+        INTERRUPT_ENABLED_PP        = 0x01, // Push-Pull
+        INTERRUPT_ENABLED_OD        = 0x02, // Open drain
+    } InterruptMode;
+    
     /**
      * Constructor.
      *
@@ -47,7 +53,9 @@
     void checkDRDY();
     void detectDRDY();
     int getSensorType();
-    
+    InterruptMode getInterrupt(uint8_t primaryId, uint8_t subId);
+    AkmSensor::Status checkSensor( const uint8_t id, const uint8_t subid, AkmECompass::SensorType* type);
+
 private:
     bool            event;    
     uint8_t         primaryId;
@@ -59,7 +67,7 @@
     InterruptIn*    drdy;
     AkmECompass::OperationMode   mode; 
     AkmECompass::Nsf   nsf; 
-    AkmECompass::Sdr   sdr; 
+    AkmECompass::Sdr   sdr;
 };
 
 #endif