![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Part of the Pacemaker Project; this models the Pacemaker.
Dependencies: mbed TextLCD mbed-rtos
Diff: PacemakerController.cpp
- Revision:
- 11:14b15f4604ad
- Parent:
- 7:af6c040f0421
- Child:
- 13:2a25dd47478e
--- a/PacemakerController.cpp Mon Nov 30 16:46:13 2015 +0000 +++ b/PacemakerController.cpp Mon Nov 30 20:30:12 2015 +0000 @@ -43,6 +43,8 @@ DigitalOut Vpace(LED2); DigitalOut Asense(LED3); DigitalOut Vsense(LED4); +DigitalOut apace(p22): +DigitalOut vpace(p21): // hardware interrupt handler, adapted from code in piazza post by Dagaen extern "C" void TIMER0_IRQHandler (void) @@ -190,11 +192,17 @@ void apace() { - // make pin 1 + apace = 1; + // wait 10ms + Thread::wait(10); + apace = 0; } void vpace() { - // make pin 1 + vpace = 1; + // wait 10ms + Thread::wait(10); + vpace = 0; }