Eric Tran
/
PacemakerVOORforkTest
eric's fork test
Fork of Pacemaker by
Diff: hardware.cpp
- Revision:
- 2:fbba2687ddfe
- Parent:
- 0:b2b3955cd77b
- Child:
- 5:253c33930e91
diff -r b2b3955cd77b -r fbba2687ddfe hardware.cpp --- a/hardware.cpp Sun Oct 30 16:04:52 2016 +0000 +++ b/hardware.cpp Mon Nov 14 01:27:31 2016 +0000 @@ -2,12 +2,12 @@ #include "hardware.h" #include "mbed.h" -AnalogOut atrium(DAC0_OUT); -AnalogOut ventricle(DAC0_OUT); +PwmOut atrium(PTC12); +PwmOut ventricle(PTC12; Serial pc(USBTX,USBRX); -hardware::hardware(): atrium(DAC0_OUT) , ventricle(DAC0_OUT) , pc(USBTX,USBRX){ +hardware::hardware(): atrium(PTC12) , ventricle(PTC12) , pc(USBTX,USBRX){ pc.baud(9600); } @@ -20,11 +20,11 @@ AnalogOut* hardware::getChamber(char chamber){ if(chamber == 'a'){ - AnalogOut* a = &atrium; + PwmOut* a = &atrium; return a; } else { - AnalogOut* v = &ventricle; + PwmOut* v = &ventricle; return v; } }