Pacemaker code Implementation for SFWRENG 3K04

Dependencies:   mbed Queue mbed-rtos FXOS8700Q

Fork of Pacemaker by Eric dollar

SWFRENG 3K04 Project to design, develop, and document a functional pacemaker.

The project uses the Freescale K64F Microcontroller and C++ mbed library.

Revision:
0:b2b3955cd77b
Child:
2:fbba2687ddfe
diff -r 000000000000 -r b2b3955cd77b pulse.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pulse.cpp	Sun Oct 30 16:04:52 2016 +0000
@@ -0,0 +1,41 @@
+#pragma once
+#include "mbed.h"
+#include "pulse.h"
+
+pulse::pulse(){}
+    
+pulse::pulse(chamberData* chamber, hardware* IOpins){
+    myIOpins = IOpins;
+    myChamber = chamber;
+   // myPaceWidth = 0; //mSec, width of ventricular pace
+//    myPaceAmp = 0; //mV, amplitude of ventricular pace
+//    myRP = 0; //mSec, duration of refractory period
+//    p_hysteresisInterval = 0;
+//    p_lowrateInterval = 0;
+//    p_hysteresis = false;
+    
+}
+
+pulse::~pulse(){
+    delete myChamber;
+    delete myIOpins;
+    delete pc;
+    delete aOut;
+}
+
+    
+
+void pulse::startPulse(){
+   // while(true){
+        pc = myIOpins->getSerial();  
+        aOut = myIOpins->getChamber(myChamber->getChamberType());
+        aOut->write(myChamber->getPaceAmp());    
+        wait(myChamber->getPaceWidth());
+        aOut->write(0);
+        
+        pc->printf("\nPulsing...check your oscilloscope!");
+       // wait(myChamber->getPaceWidth());
+        
+       // }
+}
+    
\ No newline at end of file