source: rtems/c/src/lib/libbsp/arm/gba/startup/exit.c @ 3c7ed6b

4.104.114.84.95
Last change on this file since 3c7ed6b was 3c7ed6b, checked in by Joel Sherrill <joel.sherrill@…>, on 07/06/05 at 18:46:04

2005-07-06 Markku Puro <markku.puro@…>

  • .cvsignore, ChangeLog?, Makefile.am, README, bsp_specs, configure.ac, clock/clockdrv.c, console/conio.c, console/console.c, console/defaultfont.c, include/arm_mode_bits.h, include/asm_macros.h, include/bsp.h, include/bspopts.h.in, include/conio.h, include/gba.h, include/gba_registers.h, include/tm27.h, irq/bsp_irq_asm.S, irq/bsp_irq_init.c, irq/irq.c, irq/irq.h, irq/irq_asm.S, irq/irq_init.c, start/logo.S, start/start.S, startup/bspstart.c, startup/cpu.c, startup/cpu_asm.S, startup/exit.c, startup/linkcmds, timer/timer.c: New files.
  • Property mode set to 100644
File size: 1.1 KB
RevLine 
[3c7ed6b]1/**
2 *  @file exit.c
3 *
4 *  Routines to shutdown and reboot the BSP.
5 */
6/*
7 *  RTEMS GBA BSP
8 *
9 *  Copyright (c) 2004 Markku Puro <markku.puro@kopteri.net>
10 *
11 *  The license and distribution terms for this file may be
12 *  found in found in the file LICENSE in this distribution or at
13 *  http://www.rtems.com/license/LICENSE.
14 *
15 *  $Id$
16 */
17
18#include <stdio.h>
19#include <bsp.h>
20#include <rtems/bspIo.h>
21#include <rtems/libio.h>
22#include <gba.h>
23
24
25/**
26 *  @brief rtemsReboot BSP routine reboot rtems
27 *
28 *  Input parameters:  None
29 *
30 *  Output parameters: None
31 */
32void rtemsReboot (void)
33{
34   asm volatile ("ldr  r0, =_gba_reset");
35   asm volatile ("bx   r0");
36}
37
38/**
39 *  @brief bsp_cleanup BSP routine wait input from user for rebooting
40 *
41 *  Normally at this point, the console driver is disconnected => we must
42 *  use polled output/input. This is exactly what printk does.
43 *
44 *  @param  None
45 *  @return None
46 */
47void bsp_cleanup(void)
48{
49  static const char line[]="\nEXECUTIVE SHUTDOWN! Press button to reboot...";
50  printk("\n");
51  printk("%s",line);
52  while ( !GBA_ANY_KEY(GBA_KEY_ALL) );
53  rtemsReboot();
54}
Note: See TracBrowser for help on using the repository browser.