Eric Tran
/
PacemakerVOORforkTest
eric's fork test
Fork of Pacemaker by
hardware.cpp@8:75c1dd8b0d61, 2016-11-15 (annotated)
- Committer:
- trane3
- Date:
- Tue Nov 15 00:52:39 2016 +0000
- Revision:
- 8:75c1dd8b0d61
- Parent:
- 5:253c33930e91
added voor functionality including preliminary pacing
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
FiveDollar | 0:b2b3955cd77b | 1 | #pragma once |
FiveDollar | 0:b2b3955cd77b | 2 | #include "hardware.h" |
FiveDollar | 0:b2b3955cd77b | 3 | #include "mbed.h" |
FiveDollar | 0:b2b3955cd77b | 4 | |
FiveDollar | 2:fbba2687ddfe | 5 | PwmOut atrium(PTC12); |
trane3 | 5:253c33930e91 | 6 | PwmOut ventricle(PTC12); |
FiveDollar | 0:b2b3955cd77b | 7 | Serial pc(USBTX,USBRX); |
FiveDollar | 0:b2b3955cd77b | 8 | |
FiveDollar | 0:b2b3955cd77b | 9 | |
FiveDollar | 2:fbba2687ddfe | 10 | hardware::hardware(): atrium(PTC12) , ventricle(PTC12) , pc(USBTX,USBRX){ |
FiveDollar | 0:b2b3955cd77b | 11 | pc.baud(9600); |
FiveDollar | 0:b2b3955cd77b | 12 | } |
FiveDollar | 0:b2b3955cd77b | 13 | |
FiveDollar | 0:b2b3955cd77b | 14 | hardware::~hardware(){}; |
FiveDollar | 0:b2b3955cd77b | 15 | |
FiveDollar | 0:b2b3955cd77b | 16 | Serial* hardware::getSerial(){ |
FiveDollar | 0:b2b3955cd77b | 17 | Serial* p = &pc; |
FiveDollar | 0:b2b3955cd77b | 18 | return p; |
FiveDollar | 0:b2b3955cd77b | 19 | } |
FiveDollar | 0:b2b3955cd77b | 20 | |
trane3 | 5:253c33930e91 | 21 | PwmOut* hardware::getChamber(char chamber){ |
FiveDollar | 0:b2b3955cd77b | 22 | if(chamber == 'a'){ |
FiveDollar | 2:fbba2687ddfe | 23 | PwmOut* a = &atrium; |
FiveDollar | 0:b2b3955cd77b | 24 | return a; |
FiveDollar | 0:b2b3955cd77b | 25 | } |
FiveDollar | 0:b2b3955cd77b | 26 | else { |
FiveDollar | 2:fbba2687ddfe | 27 | PwmOut* v = &ventricle; |
FiveDollar | 0:b2b3955cd77b | 28 | return v; |
FiveDollar | 0:b2b3955cd77b | 29 | } |
trane3 | 8:75c1dd8b0d61 | 30 | } |