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@33:686a1a0c690f, 2016-12-12 (annotated)
- Committer:
- noahzwiep
- Date:
- Mon Dec 12 03:31:55 2016 +0000
- Revision:
- 33:686a1a0c690f
- Child:
- 34:701503855d52
Using proper pulse functions and pins
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
noahzwiep | 33:686a1a0c690f | 1 | #include "rtos.h" |
noahzwiep | 33:686a1a0c690f | 2 | #include "mbed.h" |
noahzwiep | 33:686a1a0c690f | 3 | #include "hardware.h" |
noahzwiep | 33:686a1a0c690f | 4 | #include "pulse.h" |
noahzwiep | 33:686a1a0c690f | 5 | #include "chamberData.h" |
noahzwiep | 33:686a1a0c690f | 6 | #include "pulse.h" |
noahzwiep | 33:686a1a0c690f | 7 | #include "VVI.h" |
noahzwiep | 33:686a1a0c690f | 8 | |
noahzwiep | 33:686a1a0c690f | 9 | |
noahzwiep | 33:686a1a0c690f | 10 | DigitalOut green(LED_GREEN); |
noahzwiep | 33:686a1a0c690f | 11 | |
noahzwiep | 33:686a1a0c690f | 12 | pulse* myChamber; |
noahzwiep | 33:686a1a0c690f | 13 | |
noahzwiep | 33:686a1a0c690f | 14 | void vvi_set_chamber(pulse* c){ |
noahzwiep | 33:686a1a0c690f | 15 | myChamber = c; |
noahzwiep | 33:686a1a0c690f | 16 | } |
noahzwiep | 33:686a1a0c690f | 17 | |
noahzwiep | 33:686a1a0c690f | 18 | void start_VVI(){ |
noahzwiep | 33:686a1a0c690f | 19 | while(true){ |
noahzwiep | 33:686a1a0c690f | 20 | green = !green; |
noahzwiep | 33:686a1a0c690f | 21 | myChamber->startPulse(); |
noahzwiep | 33:686a1a0c690f | 22 | Thread::wait(200); |
noahzwiep | 33:686a1a0c690f | 23 | } |
noahzwiep | 33:686a1a0c690f | 24 | } |
noahzwiep | 33:686a1a0c690f | 25 |