source:
rtems/c/src/lib/libbsp/m68k/mrm332/include/bsp.h
@
3660154
Last change on this file since 3660154 was 3660154, checked in by Joel Sherrill <joel.sherrill@…>, on 06/01/14 at 23:18:28 | |
---|---|
|
|
File size: 1.6 KB |
Rev | Line | |
---|---|---|
[332484b5] | 1 | /* bsp.h |
2 | * | |
3 | * This include file contains all mrm board IO definitions. | |
[3420b6b] | 4 | */ |
5 | ||
6 | /* | |
[a3a6fae] | 7 | * COPYRIGHT (c) 1989-2009. |
[332484b5] | 8 | * On-Line Applications Research Corporation (OAR). |
9 | * | |
10 | * The license and distribution terms for this file may be | |
11 | * found in the file LICENSE in this distribution or at | |
[c499856] | 12 | * http://www.rtems.org/license/LICENSE. |
[332484b5] | 13 | */ |
14 | ||
[34c4852] | 15 | #ifndef _BSP_H |
16 | #define _BSP_H | |
[332484b5] | 17 | |
18 | #ifdef __cplusplus | |
19 | extern "C" { | |
20 | #endif | |
21 | ||
[c4d92216] | 22 | #include <bspopts.h> |
[a052181] | 23 | #include <bsp/default-initial-extension.h> |
[c4d92216] | 24 | |
[332484b5] | 25 | #include <rtems.h> |
[274fa77] | 26 | #include <rtems/bspIo.h> |
[fb7a141] | 27 | #include <rtems/clockdrv.h> |
28 | #include <rtems/console.h> | |
29 | #include <rtems/iosupp.h> | |
[332484b5] | 30 | #include <mrm332.h> |
[e2d51fc4] | 31 | #include <rtems/m68k/sim.h> |
[332484b5] | 32 | |
[274fa77] | 33 | #define CONSOLE_SCI |
[332484b5] | 34 | |
35 | /* externals */ | |
36 | ||
37 | extern char _etext[]; | |
38 | extern char _copy_start[]; | |
39 | extern char _edata[]; | |
40 | extern char _clear_start[]; | |
41 | extern char end[]; | |
[89aa1ec8] | 42 | extern bool _copy_data_from_rom; |
[332484b5] | 43 | |
44 | /* constants */ | |
45 | ||
46 | #ifdef __START_C__ | |
47 | #define STACK_SIZE "#0x800" | |
48 | #else | |
49 | #define STACK_SIZE 0x800 | |
50 | #endif | |
51 | ||
52 | /* macros */ | |
53 | ||
54 | #define RAW_PUTS(str) \ | |
55 | { register char *ptr = str; \ | |
[274fa77] | 56 | while (*ptr) SCI_output_char(*ptr++); \ |
[332484b5] | 57 | } |
58 | ||
59 | #define RAW_PUTI(n) { \ | |
60 | register int i, j; \ | |
61 | \ | |
62 | RAW_PUTS("0x"); \ | |
63 | for (i=28;i>=0;i -= 4) { \ | |
64 | j = (n>>i) & 0xf; \ | |
[274fa77] | 65 | SCI_output_char( (j>9 ? j-10+'a' : j+'0') ); \ |
[332484b5] | 66 | } \ |
67 | } | |
68 | ||
69 | /* miscellaneous stuff assumed to exist */ | |
70 | ||
[1fec9e0] | 71 | extern rtems_isr_entry M68Kvec[]; /* vector table address */ |
[332484b5] | 72 | |
73 | extern int stack_size; | |
74 | extern int stack_start; | |
75 | ||
76 | /* functions */ | |
77 | ||
[1fec9e0] | 78 | rtems_isr_entry set_vector( |
[332484b5] | 79 | rtems_isr_entry handler, |
80 | rtems_vector_number vector, | |
81 | int type | |
82 | ); | |
83 | ||
84 | void Spurious_Initialize(void); | |
85 | ||
86 | void _UART_flush(void); | |
87 | ||
88 | void outbyte(char); | |
89 | ||
90 | #ifdef __cplusplus | |
91 | } | |
92 | #endif | |
93 | ||
94 | #endif |
Note: See TracBrowser
for help on using the repository browser.