Library for MAX30101, read/write functions for registers implemented.

Dependents:   test_MAX30101 testSensor

Revision:
0:4ad9373787e8
Child:
1:fc677d82d0f1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MAX30101.h	Tue Dec 29 06:25:58 2015 +0000
@@ -0,0 +1,36 @@
+/**
+ * MAX30101
+ * High-Sensitivity Pulse Oximeter and
+ * Heart-Rate Sensor for Wearable Health
+ */
+#ifndef _MAX30101_H_
+#define _MAX30101_H_
+
+class MAX30101
+{
+public:
+ /**
+ * MAX30101 constructor
+ *
+ * @param sda SDA pin
+ * @param scl SCL pin
+ * @param addr 7bit address of the I2C peripheral
+ */
+ MAX30101(PinName sda, PinName scl, int addr) ;
+ 
+ ~MAX30101() ;
+ 
+uint8_t getID(void) ;
+uint8_t getRev(void) ;
+
+/*
+ * some member functions here (yet to be written)
+ */
+  
+private:
+  I2C m_i2c;
+  int m_addr;
+  void readRegs(int addr, uint8_t *data, int len) ;
+  void writeRegs(uint8_t *data, int len) ;
+} ;
+#endif /* _MAX30101_H_ */
\ No newline at end of file