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:
- 34:701503855d52
- Parent:
- 33:686a1a0c690f
- Child:
- 35:fa164704f0ca
File content as of revision 34:701503855d52:
#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; bool sensed = mySense->returnedSense(); if(!sensed){ chamberPulse->startPulse(); } Thread::wait(myChamber->getRP()); } }