Pacemaker code Implementation for SFWRENG 3K04
Dependencies: FXOS8700Q Queue mbed-rtos mbed
Fork of Pacemaker by
hardware.cpp
- Committer:
- FiveDollar
- Date:
- 2016-11-29
- Revision:
- 30:0cb4890910cd
- Parent:
- 20:bfd23a6845bb
File content as of revision 30:0cb4890910cd:
#pragma once #include "hardware.h" #include "mbed.h" hardware::hardware(): atrium(PTC10),ventricle(PTC11),pc(USBTX,USBRX),sense(PTB2){ pc.baud(9600); } hardware::~hardware(){}; Serial* hardware::getSerial(){ Serial* p = &pc; return p; } PwmOut* hardware::getChamber(char chamber){ if(chamber == 'a'){ PwmOut* a = &atrium; return a; } else { PwmOut* v = &ventricle; return v; } } double hardware::getSense(){ return sense.read(); }