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.

Committer:
trane3
Date:
Wed Nov 16 20:55:27 2016 +0000
Revision:
18:aef2f75f216b
Parent:
10:35b259e70c9a
test for threading and width setting - (eric)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
FiveDollar 0:b2b3955cd77b 1 #pragma once
FiveDollar 0:b2b3955cd77b 2 #include "mbed.h"
FiveDollar 0:b2b3955cd77b 3 #include "chamberData.h"
FiveDollar 0:b2b3955cd77b 4 #include "genData.h"
FiveDollar 0:b2b3955cd77b 5 #include "pulse.h"
FiveDollar 0:b2b3955cd77b 6 #include "hardware.h"
FiveDollar 0:b2b3955cd77b 7 #include "interface.h"
FiveDollar 9:b48423a135d8 8 #include "voor.h"
FiveDollar 9:b48423a135d8 9 #include "sense.h"
trane3 18:aef2f75f216b 10 #include "rtos.h"
trane3 1:9f1091a53ff5 11
FiveDollar 0:b2b3955cd77b 12 int main(){
FiveDollar 0:b2b3955cd77b 13 hardware* io = new hardware();
FiveDollar 9:b48423a135d8 14 genData* generalData = new genData();
FiveDollar 0:b2b3955cd77b 15 chamberData* atrium = new chamberData(io->getSerial(),'a');
FiveDollar 0:b2b3955cd77b 16 chamberData* ventricle = new chamberData(io->getSerial(), 'v');
FiveDollar 0:b2b3955cd77b 17 pulse* ventPulse = new pulse(ventricle,io);
trane3 10:35b259e70c9a 18 pulse* atrPulse = new pulse(atrium,io);
FiveDollar 9:b48423a135d8 19 interface a(io->getSerial() , ventPulse , generalData, atrium , ventricle);
trane3 10:35b259e70c9a 20 //if
FiveDollar 9:b48423a135d8 21 a.startScreen();
trane3 10:35b259e70c9a 22
trane3 10:35b259e70c9a 23
FiveDollar 0:b2b3955cd77b 24 delete ventricle; //code never reaches here, since we're stuck in the while loops of the pacing, user interface, etc.
FiveDollar 0:b2b3955cd77b 25 delete atrium;
FiveDollar 0:b2b3955cd77b 26 delete ventPulse;
FiveDollar 0:b2b3955cd77b 27 delete io;
FiveDollar 0:b2b3955cd77b 28
FiveDollar 0:b2b3955cd77b 29 return 0;
FiveDollar 9:b48423a135d8 30 }