Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: TextLCD mbed-rtos mbed
Revision 2:c38a47cdb0db, committed 2015-11-30
- Comitter:
- sanjeet25
- Date:
- Mon Nov 30 22:54:14 2015 +0000
- Parent:
- 1:d965ae2443b9
- Commit message:
- a
Changed in this revision
Pacemaker.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Pacemaker.cpp Mon Nov 30 22:23:09 2015 +0000 +++ b/Pacemaker.cpp Mon Nov 30 22:54:14 2015 +0000 @@ -101,7 +101,6 @@ void resetTimer0(); void resetTimer1(); void AorVPacesend(); -//void APacesend(); void ASignalreceive(); void VSignalreceive(); void PacemakerAtrial(); @@ -110,7 +109,7 @@ void timer1_init(); void ASignalreceive(); void updatePacemaker(); -void VSignalreceive(); +//void VSignalreceive(); void PacemakerVentricularInterval(); extern "C" void TIMER0_IRQHandler (void) @@ -180,19 +179,21 @@ void AorVPacesend(void const* args) { - Thread::signal_wait(0x01); - if(aPace) { - pc.printf("Sending APace"); - APace=1; - VPace1=0; - APace1=1; - VPace=0; - } else { - pc.printf("Sending VPace"); - VPace=1; - VPace1=1; - APace=0; - APace1=0; + while(1) { + Thread::signal_wait(0x01); + if(aPace) { + pc.printf("Sending APace"); + APace=1; + VPace1=0; + APace1=1; + VPace=0; + } else { + pc.printf("Sending VPace"); + VPace=1; + VPace1=1; + APace=0; + APace1=0; + } } } @@ -201,15 +202,16 @@ pc.printf("ASignalreceive"); asig=true; vsig=false; + } void VSignalreceive() { pc.printf("VSignalreceive"); + asig=false; vsig=true; - asig=false; + } - void ASensesend() { pc.printf("ASensesend"); @@ -334,7 +336,7 @@ pc.printf("enteredpatrial"); while(1) { while(asig==false||APace==0); - if(asig==1) { + if(asig==true) { pc.printf("asig in"); ASensesend(); } @@ -389,7 +391,7 @@ if(mode==Manual) { mode=Manual; pc.printf("Ventricular"); - // AorVPacesend(); + // AorVPacesend(); aPace=false; (*aorv).signal_set(0x01); }