Dependencies:   lpc1768

Aim

This program demonstrates the very simplest of programs, a flashing led, other projects have built on this library to use the ethernet, RTC, timers, SPI, uart1 and GPIO peripherals.

main/handlers.c

Committer:
andrewboyson
Date:
2018-12-06
Revision:
0:f4dd9936dfd9

File content as of revision 0:f4dd9936dfd9:

#include "led.h"

__irq void DefaultHandler()
{
    int value = 0;
    int count = 0;
    while (1)
    {
        count++;
        if (count > 10000000)
        {
            value = !value;
            Led1Set( value);
            Led2Set(!value);
            Led3Set(!value);
            Led4Set( value);
            count = 0;
        }
    }
}
__irq void HardFaultHandler()
{
    int value = 0;
    int count = 0;
    while (1)
    {
        count++;
        if (count > 10000000)
        {
            value = !value;
            Led4Set(value);
            count = 0;
        }
    }
}