CIS441 Controller
Dependencies: TextLCD mbed-rtos mbed
Fork of PacemakerController by
Diff: main.cpp
- Revision:
- 0:d92e0b71c6b5
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Nov 24 23:16:19 2015 +0000 @@ -0,0 +1,34 @@ +#include "mbed.h" + +// This is for the pacemaker +TextLCD lcd(p15, p16, p17, p18, p19, p20, TextLCD::LCD16x2); + +int h_clock; + +void A_Pace() { + +} + +void A_Pace() { + +} + +void timer0_init(void) +{ + LPC_SC->PCONP |=1<1; //timer0 power on + LPC_TIM0->MR0 = 239800; //10 msec + LPC_TIM0->MCR = 3; //interrupt and reset control + //3 = Interrupt & reset timer0 on match + //1 = Interrupt only, no reset of timer0 + NVIC_EnableIRQ(TIMER0_IRQn); //enable timer0 interrupt + LPC_TIM0->TCR = 1; //enable Timer0 +} + +int main() { + while(1) { + myled = 1; + wait(0.2); + myled = 0; + wait(0.2); + } +}