| 1 |
|
| 2 |
|
| 3 |
#include <console/console.h> |
| 4 |
#include <pc80/i8254.h> |
| 5 |
#include <delay.h> |
| 6 |
#include <gpio.h> |
| 7 |
|
| 8 |
static void beep_and_blink(void) |
| 9 |
{ |
| 10 |
static uint8_t blink = 0; |
| 11 |
static uint8_t beep_count = 0; |
| 12 |
|
| 13 |
gpio_set(GPP_E8, blink); |
| 14 |
|
| 15 |
if (beep_count < 12) { |
| 16 |
beep(800, 300); |
| 17 |
mdelay(200); |
| 18 |
beep_count++; |
| 19 |
} else { |
| 20 |
mdelay(500); |
| 21 |
} |
| 22 |
|
| 23 |
blink ^= 1; |
| 24 |
} |
| 25 |
|
| 26 |
void die_notify(void) |
| 27 |
{ |
| 28 |
if (ENV_POSTCAR) |
| 29 |
return; |
| 30 |
|
| 31 |
|
| 32 |
gpio_output(GPP_E8, 0); |
| 33 |
|
| 34 |
while (1) { |
| 35 |
beep_and_blink(); |
| 36 |
beep_and_blink(); |
| 37 |
beep_and_blink(); |
| 38 |
beep_and_blink(); |
| 39 |
delay(2); |
| 40 |
} |
| 41 |
} |