wdenk | affae2b | 2002-08-17 09:36:01 +0000 | [diff] [blame] | 1 | #include <config.h> |
wdenk | b028f71 | 2003-12-07 21:39:28 +0000 | [diff] [blame] | 2 | |
| 3 | #ifndef CONFIG_ADS /* Old ADS has not got any user-controllable LED */ |
| 4 | |
wdenk | affae2b | 2002-08-17 09:36:01 +0000 | [diff] [blame] | 5 | #include <common.h> |
| 6 | |
| 7 | void |
| 8 | signal_delay(unsigned int n) |
| 9 | { |
| 10 | while (n--); |
| 11 | } |
| 12 | |
| 13 | void |
| 14 | signal_on(void) |
| 15 | { |
| 16 | *((volatile uint *)BCSR4) &= ~(1<<(31-3)); /* led on */ |
| 17 | } |
| 18 | |
| 19 | void |
| 20 | signal_off(void) |
| 21 | { |
| 22 | *((volatile uint *)BCSR4) |= (1<<(31-3)); /* led off */ |
| 23 | } |
| 24 | |
| 25 | void |
| 26 | slow_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 | |
| 36 | void |
| 37 | fast_blink(unsigned int n) |
| 38 | { |
| 39 | while (n--) { |
| 40 | signal_on(); |
| 41 | signal_delay(0x00100000); |
| 42 | signal_off(); |
| 43 | signal_delay(0x00100000); |
| 44 | } |
| 45 | } |
wdenk | b028f71 | 2003-12-07 21:39:28 +0000 | [diff] [blame] | 46 | |
| 47 | #endif /* !CONFIG_ADS */ |