Pacemaker code Implementation for SFWRENG 3K04
Dependencies: mbed Queue mbed-rtos FXOS8700Q
Fork of Pacemaker by
SWFRENG 3K04 Project to design, develop, and document a functional pacemaker.
The project uses the Freescale K64F Microcontroller and C++ mbed library.
hardware.cpp
- Committer:
- trane3
- Date:
- 2016-11-24
- Revision:
- 19:d58e1e1a9a24
- Parent:
- 16:08d5e5a3ee74
- Child:
- 20:bfd23a6845bb
File content as of revision 19:d58e1e1a9a24:
#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(); }