blob: 26964059d8315034d1a9d4b08481bcc9350cd056 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
/*----------------------------------------------------------------------------
* Name: IRQ.c
* Purpose: IRQ Handler
* Note(s):
*----------------------------------------------------------------------------
* This file is part of the uVision/ARM development tools.
* This software may only be used under the terms of a valid, current,
* end user licence from KEIL for a compatible version of KEIL software
* development tools. Nothing else gives you the right to use this software.
*
* This software is supplied "AS IS" without warranties of any kind.
*
* Copyright (c) 2011 Keil - An ARM Company. All rights reserved.
*----------------------------------------------------------------------------*/
#include "LPC17xx.h" /* LPC17xx definitions */
#include "LED.h"
#include "Board_ADC.h"
#include "Blinky.h"
uint8_t clock_ms; /* Flag activated every 10 ms */
/*----------------------------------------------------------------------------
Systick Interrupt Handler
SysTick interrupt happens every 10 ms
*----------------------------------------------------------------------------*/
void SysTick_Handler (void) {
static unsigned long ticks = 0;
static unsigned long timetick;
static unsigned int leds = 0x01;
if (ticks++ >= 9) { /* Set Clock1s to 10ms */
ticks = 0;
clock_ms = 1;
}
/* Blink the LEDs depending on ADC_ConvertedValue */
/*
if (timetick++ >= (ADC_last >> 8)) {
timetick = 0;
leds <<= 1;
if (leds > (1 << LED_NUM)) leds = 0x01;
LED_Out (leds);
}
ADC_StartConversion();
*/
}
|