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