CIS441 Controller

Dependencies:   TextLCD mbed-rtos mbed

Fork of PacemakerController by Chad Nachiappan

main.cpp

Committer:
chadnach1
Date:
2015-11-24
Revision:
0:d92e0b71c6b5

File content as of revision 0:d92e0b71c6b5:

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