blob: 4e58291c06970ae638c8fba00adb26b5a083d942 [file] [log] [blame]
wdenkaffae2b2002-08-17 09:36:01 +00001#include <config.h>
wdenk444f22b2003-12-07 21:39:28 +00002
3#ifndef CONFIG_ADS /* Old ADS has not got any user-controllable LED */
4
wdenkaffae2b2002-08-17 09:36:01 +00005#include <common.h>
6
7void
8signal_delay(unsigned int n)
9{
10 while (n--);
11}
12
13void
14signal_on(void)
15{
16 *((volatile uint *)BCSR4) &= ~(1<<(31-3)); /* led on */
17}
18
19void
20signal_off(void)
21{
22 *((volatile uint *)BCSR4) |= (1<<(31-3)); /* led off */
23}
24
25void
26slow_blink(unsigned int n)
27{
28 while (n--) {
29 signal_on();
30 signal_delay(0x00400000);
31 signal_off();
32 signal_delay(0x00400000);
33 }
34}
35
36void
37fast_blink(unsigned int n)
38{
39 while (n--) {
40 signal_on();
41 signal_delay(0x00100000);
42 signal_off();
43 signal_delay(0x00100000);
44 }
45}
wdenk444f22b2003-12-07 21:39:28 +000046
47#endif /* !CONFIG_ADS */