source: rtems/c/src/lib/libbsp/shared/bspclean.c @ 90d8567

Last change on this file since 90d8567 was c499856, checked in by Chris Johns <chrisj@…>, on Mar 20, 2014 at 9:10:47 PM

Change all references of rtems.com to rtems.org.

  • Property mode set to 100644
File size: 1.0 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-1999.
3 *  On-Line Applications Research Corporation (OAR).
4 *
5 *  The license and distribution terms for this file may be
6 *  found in the file LICENSE in this distribution or at
7 *  http://www.rtems.org/license/LICENSE.
8 */
9
10#include <bsp.h>
11#include <bsp/bootcard.h>
12#include <rtems/bspIo.h>
13
14void bsp_fatal_extension(
15  rtems_fatal_source source,
16  bool is_internal,
17  rtems_fatal_code code
18)
19{
20  #if (BSP_PRESS_KEY_FOR_RESET)
21    printk( "\nEXECUTIVE SHUTDOWN! Any key to reboot..." );
22
23    /*
24     * Wait for a key to be pressed
25     */
26    while ( getchark() == -1 )
27      ;
28
29    printk("\n");
30  #endif
31
32  #if (BSP_PRINT_EXCEPTION_CONTEXT)
33    if ( source == RTEMS_FATAL_SOURCE_EXCEPTION ) {
34      rtems_exception_frame_print( (const rtems_exception_frame *) code );
35    }
36  #endif
37
38  /*
39   *  Check both conditions -- if you want to ask for reboot, then
40   *  you must have meant to reset the board.
41   */
42  #if (BSP_PRESS_KEY_FOR_RESET) || (BSP_RESET_BOARD_AT_EXIT)
43    bsp_reset();
44  #endif
45}
Note: See TracBrowser for help on using the repository browser.