1 | /* |
---|
2 | * This include file contains all board IO definitions. |
---|
3 | * |
---|
4 | * SH-gdb simulator BSP |
---|
5 | * |
---|
6 | * Author: Ralf Corsepius (corsepiu@faw.uni-ulm.de) |
---|
7 | * |
---|
8 | * COPYRIGHT (c) 2001, Ralf Corsepius, Ulm, Germany |
---|
9 | * |
---|
10 | * This program is distributed in the hope that it will be useful, |
---|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
---|
13 | * |
---|
14 | * COPYRIGHT (c) 2001. |
---|
15 | * On-Line Applications Research Corporation (OAR). |
---|
16 | * |
---|
17 | * The license and distribution terms for this file may be |
---|
18 | * found in the file LICENSE in this distribution or at |
---|
19 | * http://www.rtems.com/license/LICENSE. |
---|
20 | * |
---|
21 | * $Id$ |
---|
22 | */ |
---|
23 | |
---|
24 | #ifndef _BSP_H |
---|
25 | #define _BSP_H |
---|
26 | |
---|
27 | #ifdef __cplusplus |
---|
28 | extern "C" { |
---|
29 | #endif |
---|
30 | |
---|
31 | #include <rtems.h> |
---|
32 | #include <rtems/clockdrv.h> |
---|
33 | #include <rtems/console.h> |
---|
34 | |
---|
35 | #include <bspopts.h> |
---|
36 | |
---|
37 | /* |
---|
38 | * FIXME: One of these would be enough. |
---|
39 | */ |
---|
40 | #include <gdbsci.h> |
---|
41 | #include <rtems/devnull.h> |
---|
42 | |
---|
43 | /* Constants */ |
---|
44 | |
---|
45 | /* |
---|
46 | * Simple spin delay in microsecond units for device drivers. |
---|
47 | * This is very dependent on the clock speed of the target. |
---|
48 | * |
---|
49 | * FIXME: Not applicable with gdb's simulator |
---|
50 | * Kept for sourcecode compatibility with other sh-BSPs |
---|
51 | */ |
---|
52 | #define rtems_bsp_delay( microseconds ) CPU_delay(microseconds) |
---|
53 | #define sh_delay( microseconds ) CPU_delay(microseconds) |
---|
54 | |
---|
55 | /* |
---|
56 | * Defined in the linker script 'linkcmds' |
---|
57 | */ |
---|
58 | |
---|
59 | extern uint32_t HeapStart ; |
---|
60 | extern uint32_t HeapEnd ; |
---|
61 | extern uint32_t WorkSpaceStart ; |
---|
62 | extern uint32_t WorkSpaceEnd ; |
---|
63 | |
---|
64 | extern void *CPU_Interrupt_stack_low ; |
---|
65 | extern void *CPU_Interrupt_stack_high ; |
---|
66 | |
---|
67 | /* miscellaneous stuff assumed to exist */ |
---|
68 | |
---|
69 | extern void bsp_cleanup( void ); |
---|
70 | |
---|
71 | /* |
---|
72 | * Device Driver Table Entries |
---|
73 | */ |
---|
74 | |
---|
75 | /* |
---|
76 | * Redefine CONSOLE_DRIVER_TABLE_ENTRY to redirect /dev/console |
---|
77 | */ |
---|
78 | #undef CONSOLE_DRIVER_TABLE_ENTRY |
---|
79 | #define CONSOLE_DRIVER_TABLE_ENTRY \ |
---|
80 | BSP_CONSOLE_DRIVER_TABLE_ENTRY, \ |
---|
81 | { console_initialize, console_open, console_close, \ |
---|
82 | console_read, console_write, console_control } |
---|
83 | |
---|
84 | /* |
---|
85 | * NOTE: Use the standard Clock driver entry |
---|
86 | */ |
---|
87 | |
---|
88 | #ifdef __cplusplus |
---|
89 | } |
---|
90 | #endif |
---|
91 | |
---|
92 | #endif |
---|