blob: b12147740e4c1e3fd773a4c8cea25d2a7e46f491 [file] [log] [blame]
wdenkaffae2b2002-08-17 09:36:01 +00001#include <config.h>
2#include <common.h>
3
4void
5signal_delay(unsigned int n)
6{
7 while (n--);
8}
9
10void
11signal_on(void)
12{
13 *((volatile uint *)BCSR4) &= ~(1<<(31-3)); /* led on */
14}
15
16void
17signal_off(void)
18{
19 *((volatile uint *)BCSR4) |= (1<<(31-3)); /* led off */
20}
21
22void
23slow_blink(unsigned int n)
24{
25 while (n--) {
26 signal_on();
27 signal_delay(0x00400000);
28 signal_off();
29 signal_delay(0x00400000);
30 }
31}
32
33void
34fast_blink(unsigned int n)
35{
36 while (n--) {
37 signal_on();
38 signal_delay(0x00100000);
39 signal_off();
40 signal_delay(0x00100000);
41 }
42}