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