Library for MAX30101 SpO2 and heart rate sensor
Dependents: HeartRate HeartRate proj final_project_ee119 ... more
Revision 7:ce122c27358e, committed 2017-07-27
- Comitter:
- j3
- Date:
- Thu Jul 27 20:40:29 2017 +0000
- Parent:
- 6:302fb0f991d8
- Child:
- 8:cc2dae00ce63
- Commit message:
- Made private I2C member reference due to non copyable restriction on class made by mbed a few updates ago.; ; Removed constructor that uses PinNames, user must pass existing I2C object when instantiating this class.; ;
Changed in this revision
| MAX30101.cpp | Show annotated file Show diff for this revision Revisions of this file |
| MAX30101.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/MAX30101.cpp Thu May 18 20:53:46 2017 +0000
+++ b/MAX30101.cpp Thu Jul 27 20:40:29 2017 +0000
@@ -36,14 +36,6 @@
//*****************************************************************************
-MAX30101::MAX30101(PinName sda, PinName scl):
-m_i2cBus(sda, scl)
-{
- //empty block
-}
-
-
-//*****************************************************************************
MAX30101::MAX30101(I2C &i2c):
m_i2cBus(i2c)
{
--- a/MAX30101.h Thu May 18 20:53:46 2017 +0000
+++ b/MAX30101.h Thu Jul 27 20:40:29 2017 +0000
@@ -233,13 +233,6 @@
};
/**
- * @brief Constructor using I2C PinNames
- * @param sda - Pinname for sda
- * @param scl - Pinname for scl
- */
- MAX30101(PinName sda, PinName scl);
-
- /**
* @brief Constructor using reference to I2C object
* @param i2c - Reference to I2C object
*/
@@ -422,7 +415,7 @@
private:
- I2C m_i2cBus;
+ I2C & m_i2cBus;
uint8_t m_fifoReadPtr, m_fifoWritePtr, m_fifoNumBytes;