source:
rtems/c/src/lib/libbsp/arm/gba/startup/exit.c
@
3c7ed6b
Last change on this file since 3c7ed6b was 3c7ed6b, checked in by Joel Sherrill <joel.sherrill@…>, on 07/06/05 at 18:46:04 | |
---|---|
|
|
File size: 1.1 KB |
Rev | Line | |
---|---|---|
[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 | */ | |
32 | void 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 | */ | |
47 | void 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.