3k04 team / Mbed 2 deprecated Pacemaker

Dependencies:   mbed Queue mbed-rtos FXOS8700Q

Fork of Pacemaker by Eric dollar

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers pulse.h Source File

pulse.h

00001 #pragma once
00002 #include "mbed.h"
00003 #include "hardware.h"
00004 #include "chamberData.h"
00005 
00006 class pulse{
00007 public:
00008     pulse();
00009     pulse(chamberData*, hardware*);
00010     ~pulse();
00011     void startPulse();
00012     void pace_charge_shutdown();
00013    // void pulsegenerator_initialize ();    
00014    // void setChamber(chamberData*); //used in VOOR (for now; might change) - eric
00015     
00016 private:
00017     double myPaceWidth; //mSec; width of ventricular pace
00018     double myPaceAmp; //mV; amplitude of ventricular pace
00019     double myRP; //mSec; duration of refractory period
00020     float p_hysteresisInterval;
00021     float p_lowrateInterval;
00022     bool p_hysteresis;
00023     Serial* pc;
00024     PwmOut* aOut;
00025     chamberData* myChamber;
00026     hardware* myIOpins;    
00027     void vent_pace_prime ();
00028     void atr_pace_prime ();
00029     void pace_vent (double pulse_width_us);
00030     void pace_atr (double pulse_width_us);
00031     AnalogIn atrialIn;      // Pin A0
00032     AnalogIn ventricleIn;      // Pin A1
00033     AnalogIn leadImpedence;      // Pin A2
00034     AnalogIn atr_rect_signal;      // Pin A3
00035     AnalogIn vent_rect_signal;      // Pin A4
00036     
00037     /*=== Digital In ===*/
00038     DigitalIn atria_cmp_detect;   // Pin D0
00039     DigitalIn vent_cmp_detect;   // Pin D1
00040     
00041     /*=== PWM Out ===*/
00042     /* DigitalOut is used for the REF Signal
00043      * due to absence of PWM capabilities of Pins D2 and D4
00044      * on the FRDM-K64F Board
00045      */
00046     PwmOut pacing_ref_pwm;    // Pin D2 (PTB9)
00047     DigitalOut vent_ref_pwm;    // Pin D3
00048     DigitalOut atria_ref_pwm;   // Pin D4
00049     
00050     
00051     /*=== Digital Out ===*/
00052     DigitalOut pace_charge_ctrl;    // Pin D5
00053     DigitalOut z_atria_ctrl;    // Pin D6
00054     DigitalOut z_vent_ctrl;    // Pin D7
00055     
00056     DigitalOut atr_pace_ctrl;  // Pin D8
00057     DigitalOut vent_pace_ctrl;    // Pin D9
00058     DigitalOut pace_grnd_ctrl;    // Pin D10
00059     DigitalOut atr_grnd_ctrl;    // Pin D11
00060     DigitalOut vent_grnd_ctrl;    // Pin D12
00061     DigitalOut frontend_ctrl;
00062 };