Pacemaker code Implementation for SFWRENG 3K04
Dependencies: FXOS8700Q Queue mbed-rtos mbed
Fork of Pacemaker by
hardware.cpp
- Committer:
- FiveDollar
- Date:
- 2016-11-14
- Revision:
- 1:fbba2687ddfe
- Parent:
- 0:b2b3955cd77b
- Child:
- 5:253c33930e91
File content as of revision 1:fbba2687ddfe:
#pragma once #include "hardware.h" #include "mbed.h" PwmOut atrium(PTC12); PwmOut ventricle(PTC12; Serial pc(USBTX,USBRX); hardware::hardware(): atrium(PTC12) , ventricle(PTC12) , pc(USBTX,USBRX){ pc.baud(9600); } hardware::~hardware(){}; Serial* hardware::getSerial(){ Serial* p = &pc; return p; } AnalogOut* hardware::getChamber(char chamber){ if(chamber == 'a'){ PwmOut* a = &atrium; return a; } else { PwmOut* v = &ventricle; return v; } }