source: rtems/c/src/lib/libbsp/shared/bspclean.c @ 0c0181d

4.115
Last change on this file since 0c0181d was 1e1ee0c, checked in by Joel Sherrill <joel.sherrill@…>, on 07/13/11 at 18:35:04

2011-07-13 Joel Sherrill <joel.sherrilL@…>

PR 1824/cpukit

  • bootcard.c, bspclean.c, include/bootcard.h: Return exit/shutdown status back to boot_card(). boot_card() propagates this to bsp_cleanup() and returns it to the assembly that started the application.
  • Property mode set to 100644
File size: 882 bytes
Line 
1/*
2 *  This is a dummy bsp_cleanup routine.
3 *
4 *  COPYRIGHT (c) 1989-1999.
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
9 *  http://www.rtems.com/license/LICENSE.
10 *
11 *  $Id$
12 */
13
14#include <rtems.h>
15#include <rtems/bspIo.h>
16#include <bsp.h>
17#include <bspopts.h>
18#include <bsp/bootcard.h>
19
20void bsp_cleanup(
21  uint32_t status
22)
23{
24  #if (BSP_PRESS_KEY_FOR_RESET)
25    printk( "\nEXECUTIVE SHUTDOWN! Any key to reboot..." );
26
27    /*
28     * Wait for a key to be pressed
29     */
30    while ( getchark() == -1 )
31      ;
32
33    printk("\n");
34  #endif
35
36  /*
37   *  Check both conditions -- if you want to ask for reboot, then
38   *  you must have meant to reset the board.
39   */
40  #if (BSP_PRESS_KEY_FOR_RESET) || (BSP_RESET_BOARD_AT_EXIT)
41    bsp_reset();
42  #endif
43}
Note: See TracBrowser for help on using the repository browser.