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