Pacemaker code Implementation for SFWRENG 3K04
Dependencies: mbed Queue mbed-rtos FXOS8700Q
Fork of Pacemaker by
SWFRENG 3K04 Project to design, develop, and document a functional pacemaker.
The project uses the Freescale K64F Microcontroller and C++ mbed library.
VVI.cpp
- Committer:
- noahzwiep
- Date:
- 2016-12-13
- Revision:
- 35:fa164704f0ca
- Parent:
- 34:701503855d52
- Child:
- 36:b6431cd8ecd6
File content as of revision 35:fa164704f0ca:
#include "rtos.h" #include "mbed.h" #include "hardware.h" #include "pulse.h" #include "chamberData.h" #include "pulse.h" #include "VVI.h" #include "sense.h" DigitalOut green(LED_GREEN); pulse* chamberPulse; chamberData* myChamber; sense* mySense; void vvi_set_chamber(pulse* c, chamberData* d, sense* e){ chamberPulse = c; myChamber = d; mySense = e; } void start_VVI(){ while(true){ green = !green; myChamber->setMarker('x'); bool sensed = mySense->returnedSense(); if(!sensed){ chamberPulse->startPulse(); myChamber->setMarker('p'); } else{ myChamber->setMarker('s'); } Thread::wait(myChamber->getRP()); } }