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 | |
wdenk | affae2b | 2002-08-17 09:36:01 +0000 | [diff] [blame] | 3 | #include <common.h> |
| 4 | |
| 5 | void |
| 6 | signal_delay(unsigned int n) |
| 7 | { |
| 8 | while (n--); |
| 9 | } |
| 10 | |
| 11 | void |
| 12 | signal_on(void) |
| 13 | { |
| 14 | *((volatile uint *)BCSR4) &= ~(1<<(31-3)); /* led on */ |
| 15 | } |
| 16 | |
| 17 | void |
| 18 | signal_off(void) |
| 19 | { |
| 20 | *((volatile uint *)BCSR4) |= (1<<(31-3)); /* led off */ |
| 21 | } |
| 22 | |
| 23 | void |
| 24 | slow_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 | |
| 34 | void |
| 35 | fast_blink(unsigned int n) |
| 36 | { |
| 37 | while (n--) { |
| 38 | signal_on(); |
| 39 | signal_delay(0x00100000); |
| 40 | signal_off(); |
| 41 | signal_delay(0x00100000); |
| 42 | } |
| 43 | } |