Combine AS7000 into BNO055

Fork of BNO055 by Sog Yang

Revision:
10:1914e07be563
Parent:
8:dee5f9d9f36c
--- a/BNO055.h	Thu May 04 02:37:08 2017 +0000
+++ b/BNO055.h	Mon May 22 08:03:56 2017 +0000
@@ -173,14 +173,40 @@
     char serial[16];
     }chip;
 
+#define AS7000Address 0x60
+//Register definitions
+#define AS7000_STARTUP  0x04 //4
+#define HR_ONLY         0x08 //8
+#define HR_ONLY_LEN     0x07 //7
+#define HR_REG          0x12 //18
+#define HR_LEN          21
+
+typedef struct{
+  uint8_t  transaction_id;
+  uint8_t  status;
+  uint8_t  hreat_rate;
+  uint8_t  signal_QA;
+  uint16_t LED_current;
+  uint8_t  SYNC;
+  uint8_t  startup_flag;
+  bool     contact_detected;
+}as7000_t;
+
 /** Class for operating Bosch BNO055 sensor over I2C **/
 class BNO055 
 { 
 public: 
-
+    
 /** Create BNO055 instance **/
     BNO055(PinName SDA, PinName SCL); 
-    
+
+    void gpio_init(void);
+    void enable   (void);///< Heart Rate Sensor Enbable API,it include startup senario
+    void startup  (void);
+    void hr_only  (void);///< Hreat Rate Sensor sensing and data
+    void update (void);
+    as7000_t hrm;  
+        
 /** Perform a power-on reset of the BNO055 **/
     void reset();
 /** Check that the BNO055 is connected and download the software details 
@@ -276,5 +302,13 @@
 void setpage(char value){
     writechar(BNO055_PAGE_ID_ADDR,value);
 }
+    
+//    private:    
+//        I2C _i2c;
+//        char rx,tx[2],address;
+//        char rawdata[22];
+        char hreat_rate;
+        char startup_flag;
+
     };
 #endif
\ No newline at end of file