4.104.115
Last change
on this file since 54cf1198 was
54cf1198,
checked in by Joel Sherrill <joel.sherrill@…>, on 09/22/08 at 21:50:54
|
2008-09-22 Joel Sherrill <joel.sherrill@…>
- bspclean.c, include/bootcard.h: Use standardized bsp_cleanup() which
can optionally print a message, poll for user to press key, and call
bsp_reset(). Using this eliminates the various bsp_cleanup()
implementations which had their own implementation and variety of
string constants.
- bspreset.c, bspreset_fatal.c, bspreset_loop.c: New files.
|
-
Property mode set to
100644
|
File size:
870 bytes
|
Rev | Line | |
---|
[e2a2ec60] | 1 | /* |
---|
| 2 | * This is a dummy bsp_cleanup routine. |
---|
| 3 | * |
---|
[08311cc3] | 4 | * COPYRIGHT (c) 1989-1999. |
---|
[e2a2ec60] | 5 | * On-Line Applications Research Corporation (OAR). |
---|
| 6 | * |
---|
| 7 | * The license and distribution terms for this file may be |
---|
| 8 | * found in the file LICENSE in this distribution or at |
---|
[7050ec70] | 9 | * http://www.rtems.com/license/LICENSE. |
---|
[e2a2ec60] | 10 | * |
---|
| 11 | * $Id$ |
---|
| 12 | */ |
---|
| 13 | |
---|
[54cf1198] | 14 | #include <rtems.h> |
---|
| 15 | #include <rtems/bspIo.h> |
---|
| 16 | #include <bsp.h> |
---|
| 17 | #include <bspopts.h> |
---|
| 18 | #include <bsp/bootcard.h> |
---|
| 19 | |
---|
[e2a2ec60] | 20 | void bsp_cleanup( void ) |
---|
| 21 | { |
---|
[54cf1198] | 22 | #if (BSP_PRESS_KEY_FOR_RESET) |
---|
| 23 | printk( "\nEXECUTIVE SHUTDOWN! Any key to reboot..." ); |
---|
| 24 | |
---|
| 25 | /* |
---|
| 26 | * Wait for a key to be pressed |
---|
| 27 | */ |
---|
| 28 | while ( getchark() == -1 ) |
---|
| 29 | ; |
---|
| 30 | |
---|
| 31 | printk("\n"); |
---|
| 32 | #endif |
---|
| 33 | |
---|
| 34 | /* |
---|
| 35 | * Check both conditions -- if you want to ask for reboot, then |
---|
| 36 | * you must have meant to reset the board. |
---|
| 37 | */ |
---|
| 38 | #if (BSP_PRESS_KEY_FOR_RESET) || (BSP_RESET_BOARD_AT_EXIT) |
---|
| 39 | bsp_reset(); |
---|
| 40 | #endif |
---|
[e2a2ec60] | 41 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.