maxrefdes117

Revision:
0:78a2573ad768
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/heartRate.h	Tue Aug 06 12:19:46 2019 +0000
@@ -0,0 +1,36 @@
+#include "mbed.h"
+
+#ifndef HEARTRATE_H_
+#define HEARTRATE_H_
+
+
+class heartRate {
+public:
+    bool checkForBeat(int32_t sample);
+    int16_t averageDCEstimator(int32_t *p, uint16_t x);
+    int16_t lowPassFIRFilter(int16_t din);
+    int32_t mul16(int16_t x, int16_t y);
+
+private:
+
+    /*int16_t IR_AC_Max = 20;
+    int16_t IR_AC_Min = -20;
+    
+    int16_t IR_AC_Signal_Current = 0;
+    int16_t IR_AC_Signal_Previous;
+    int16_t IR_AC_Signal_min = 0;
+    int16_t IR_AC_Signal_max = 0;
+    int16_t IR_Average_Estimated;
+
+    int16_t positiveEdge = 0;
+    int16_t negativeEdge = 0;
+    int32_t ir_avg_reg = 0;
+    
+    int16_t cbuf[32];
+    uint8_t offset = 0;
+    static const uint16_t FIRCoeffs[12] = {172, 321, 579, 927, 1360, 1858, 2390, 2916, 3391, 3768, 4012, 4096};*/
+    
+
+};
+ 
+#endif
\ No newline at end of file