summaryrefslogblamecommitdiffstats
path: root/c/src/lib/libbsp/shared/bspclean.c
blob: 31fa0465722431ee2e8d98c783204e31d543fb65 (plain) (tree)
1
2
3
4
5
6
7
8
9


                                        
                            
                                                    


                                                           
                                         



        





                         

                        

















                                                                  
        
 
/*
 *  This is a dummy bsp_cleanup routine.
 *
 *  COPYRIGHT (c) 1989-1999.
 *  On-Line Applications Research Corporation (OAR).
 *
 *  The license and distribution terms for this file may be
 *  found in the file LICENSE in this distribution or at
 *  http://www.rtems.com/license/LICENSE.
 *
 *  $Id$
 */

#include <rtems.h>
#include <rtems/bspIo.h>
#include <bsp.h>
#include <bspopts.h>
#include <bsp/bootcard.h>

void bsp_cleanup( void )
{
  #if (BSP_PRESS_KEY_FOR_RESET)
    printk( "\nEXECUTIVE SHUTDOWN! Any key to reboot..." );

    /*
     * Wait for a key to be pressed
     */
    while ( getchark() == -1 )
      ;

    printk("\n");
  #endif

  /*
   *  Check both conditions -- if you want to ask for reboot, then
   *  you must have meant to reset the board.
   */
  #if (BSP_PRESS_KEY_FOR_RESET) || (BSP_RESET_BOARD_AT_EXIT)
    bsp_reset();
  #endif
}