4.104.114.95
Last change
on this file since 21c9770 was
21c9770,
checked in by Joel Sherrill <joel.sherrill@…>, on 08/21/08 at 19:33:53
|
2008-08-21 Joel Sherrill <joel.sherrill@…>
- Makefile.am: No BSP should use exit.c as a file name. exit() is POSIX
routine.
- startup/bspclean.c: New file.
- startup/exit.c: Removed.
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Line | |
---|
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.