Pacemaker code Implementation for SFWRENG 3K04

Dependencies:   mbed Queue mbed-rtos FXOS8700Q

Fork of Pacemaker by Eric dollar

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-15
Revision:
8:75c1dd8b0d61
Parent:
5:253c33930e91
Child:
10:35b259e70c9a

File content as of revision 8:75c1dd8b0d61:

#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;
}

PwmOut* hardware::getChamber(char chamber){
    if(chamber == 'a'){
        PwmOut* a = &atrium;
        return a;
        }
    else {
        PwmOut* v = &ventricle;
        return v;
    }
}