AKM Development Platform. This is the D7.014 version.

Dependencies:   AK09970 AK099XX AK7401 AK7451 AK8963X AK9750 AK9752 AkmSensor BLE_API I2CNano MCP342x SerialNano SpiNano TCA9554A mbed nRF51822

Fork of AKDP by Masahiko Fukasawa

Revision:
11:53e52f5f1051
Parent:
1:0914af311974
Child:
12:522a22a23f8a
--- a/Message.h	Sat Jun 11 00:18:38 2016 +0000
+++ b/Message.h	Thu Jun 16 18:37:41 2016 +0000
@@ -9,13 +9,26 @@
     typedef enum {
         CMD_GET_FW_VERSION = 0x01,                     /**< Gets FW version.                */
         CMD_GET_MAG_PART = 0x02,                       /**< Gets magnetic sensor ID         */
-        CMD_GET_THRESHOLD = 0x80,                      /**< Gets threshold of AK0997x       */
-        CMD_SET_THRESHOLD_FROM_HOST = 0x81,            /**< Sets threshold of AK0997x from host. */
-        CMD_SET_MEASUREMENT_FREQUENCY = 0x82,          /**< Sets measurement frequency.     */
-        CMD_SEND_SWITCH_MODE_MEASUREMENT_DATA = 0x83,  /**< Sends measurement data on/off   */
-        CMD_SWITCH_MODE_MEASUREMENT_DATA = 0x84,       /**< Measurement data in switch mode */
-        CMD_GET_POLARITY = 0x85,                       /**< Gets polarity of AK0997x        */
-        CMD_SET_POLARITY = 0x86,                       /**< Sets polarity of AK0997x        */
+//        CMD_GET_THRESHOLD = 0x80,                      /**< Gets threshold of AK0997x       */
+//        CMD_SET_THRESHOLD_FROM_HOST = 0x81,            /**< Sets threshold of AK0997x from host. */
+//        CMD_SET_MEASUREMENT_FREQUENCY = 0x82,          /**< Sets measurement frequency.     */
+//        CMD_SEND_SWITCH_MODE_MEASUREMENT_DATA = 0x83,  /**< Sends measurement data on/off   */
+//        CMD_SWITCH_MODE_MEASUREMENT_DATA = 0x84,       /**< Measurement data in switch mode */
+//        CMD_GET_POLARITY = 0x85,                       /**< Gets polarity of AK0997x        */
+//        CMD_SET_POLARITY = 0x86,                       /**< Sets polarity of AK0997x        */
+
+        CMD_PROGSW_GET_THRESHOLD = 0x80,               /**< Gets threshold of AK09970.       */
+        CMD_PROGSW_SET_THRESHOLD = 0x81,               /**< Sets threshold of AK09970.       */
+//        CMD_PROGSW_GET_READ_ADDRESS = 0x82,            /**< Gets read address of AK09970.       */
+//        CMD_PROGSW_SET_READ_ADDRESS = 0x83,            /**< Sets read address of AK09970.       */
+//        CMD_PROGSW_GET_SWITCH_MODE = 0x84,             /**< Gets interrupt mode of AK09970.       */
+//        CMD_PROGSW_SET_SWITCH_MODE = 0x85,             /**< Sets interrupt mode of AK09970.       */
+        CMD_PROGSW_GET_READ_COFIGURATION = 0x82,       /**< Gets read configuration of AK09970.       */
+        CMD_PROGSW_SET_READ_COFIGURATION = 0x83,       /**< Sets read configuration of AK09970.       */
+        CMD_PROGSW_GET_SWITCH_COFIGURATION = 0x84,     /**< Gets switch configuration of AK09970.       */
+        CMD_PROGSW_SET_SWITCH_COFIGURATION = 0x85,     /**< Sets switch configuration of AK09970.       */
+        CMD_PROGSW_GET_OPERATION_MODE = 0x86,          /**< Gets operation mode of AK09970.       */
+        CMD_PROGSW_SET_OPERATION_MODE = 0x87,          /**< Sets operation mode of AK09970.       */
 
         CMD_IR_GET_THRESHOLD = 0x90,                   /**< Gets threshold of AK9750.       */
         CMD_IR_SET_THRESHOLD = 0x91,                   /**< Sets threshold of AK9750.       */
@@ -47,34 +60,35 @@
 //        CMD_GET_MOTION_THRESHOLD = 0xB2,               /**< Get motion threshold            */
 //        CMD_SET_MOTION_THRESHOLD = 0xB3,               /**< Set motion threshold            */
         CMD_UNKNOWN = 0x00,                            /**< Unknown command.                */
-
         CMD_SET_SERIAL_TARGET = 0x0A,                  /**< Set serial output target        */
         CMD_REG_WRITE = 0x11,                          /**< Register write 1 byte           */
         CMD_REG_WRITEN = 0x12,                         /**< Register write N bytes          */
         CMD_REG_READ = 0x13,                           /**< Register read 1 byte            */
         CMD_REG_READN = 0x14,                          /**< Register read N bytes           */
+        CMD_COMPASS_GET_OPERATION_MODE = 0x16,         /**< Gets operation mode of e-compass*/
+        CMD_COMPASS_SET_OPERATION_MODE = 0x17,         /**< Sets operation mode of e-compass*/
         CMD_GET_ID = 0xB0,                             /**< Get connected sensor ID         */
         CMD_STOP_MEASUREMENT = 0xBA,                   /**< Stop Measurement                */
         CMD_START_MEASUREMENT = 0xBB,                  /**< Start Measurement               */
         CMD_ANGLE_ZERO_RESET = 0xBC,                   /**< Angle sensor zero reset         */
     } Command;
+
+//  typedef enum {
+//      ARG_MAG_FREQ_1HZ = 0x00,                           /**< Frequency setting 1 Hz */
+//      ARG_MAG_FREQ_10HZ = 0x01,                          /**< Frequency setting 10 Hz */
+//      ARG_MAG_FREQ_20HZ = 0x02,                          /**< Frequency setting 20 Hz */
+//      ARG_MAG_FREQ_50HZ = 0x03,                          /**< Frequency setting 50 Hz */
+//      ARG_MAG_FREQ_100HZ = 0x04,                         /**< Frequency setting 100 Hz */
+//      ARG_MAG_FREQ_POWER_DOWN = 0x05,                    /**< Frequency setting 0 Hz (Power-down) */
+//      ARG_MAG_FREQ_0P5HZ = 0x06,                         /**< Frequency setting 0.5 Hz */
+//      ARG_MAG_FREQ_0P25HZ = 0x07,                        /**< Frequency setting 0.25 Hz */
+//  } MagFrequency;
     
-    typedef enum {
-        ARG_MAG_FREQ_1HZ = 0x00,                           /**< Frequency setting 1 Hz */
-        ARG_MAG_FREQ_10HZ = 0x01,                          /**< Frequency setting 10 Hz */
-        ARG_MAG_FREQ_20HZ = 0x02,                          /**< Frequency setting 20 Hz */
-        ARG_MAG_FREQ_50HZ = 0x03,                          /**< Frequency setting 50 Hz */
-        ARG_MAG_FREQ_100HZ = 0x04,                         /**< Frequency setting 100 Hz */
-        ARG_MAG_FREQ_POWER_DOWN = 0x05,                    /**< Frequency setting 0 Hz (Power-down) */
-        ARG_MAG_FREQ_0P5HZ = 0x06,                         /**< Frequency setting 0.5 Hz */
-        ARG_MAG_FREQ_0P25HZ = 0x07,                        /**< Frequency setting 0.25 Hz */
-    } MagFrequency;
-    
-    typedef enum{
-        SW_OFF = 0x00,
-        SW_ON = 0x01,
-    } SwitchState;
-    
+  typedef enum{
+      SW_OFF = 0x00,
+      SW_ON = 0x01,
+  } SwitchState;
+
     typedef enum {
         SUCCESS = 0,
         END_OF_STR,