4.115
Line | |
---|
1 | /* bsp.h |
---|
2 | * |
---|
3 | * This include file contains all board IO definitions. |
---|
4 | * |
---|
5 | * XXX : put yours in here |
---|
6 | * |
---|
7 | * COPYRIGHT (c) 1989-1999. |
---|
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 |
---|
12 | * http://www.rtems.com/license/LICENSE. |
---|
13 | * |
---|
14 | * $Id$ |
---|
15 | */ |
---|
16 | |
---|
17 | #ifndef _BSP_H |
---|
18 | #define _BSP_H |
---|
19 | |
---|
20 | #ifdef __cplusplus |
---|
21 | extern "C" { |
---|
22 | #endif |
---|
23 | |
---|
24 | #include <bspopts.h> |
---|
25 | |
---|
26 | #include <rtems.h> |
---|
27 | #include <rtems/console.h> |
---|
28 | #include <rtems/iosupp.h> |
---|
29 | #include <rtems/clockdrv.h> |
---|
30 | |
---|
31 | /* |
---|
32 | * Simple spin delay in microsecond units for device drivers. |
---|
33 | * This is very dependent on the clock speed of the target. |
---|
34 | */ |
---|
35 | |
---|
36 | #define rtems_bsp_delay( microseconds ) \ |
---|
37 | { register uint32_t _delay=(microseconds); \ |
---|
38 | register uint32_t _tmp=123; \ |
---|
39 | __asm__ volatile( "0: \ |
---|
40 | nbcd %0 ; \ |
---|
41 | nbcd %0 ; \ |
---|
42 | dbf %1,0b" \ |
---|
43 | : "=d" (_tmp), "=d" (_delay) \ |
---|
44 | : "0" (_tmp), "1" (_delay) ); \ |
---|
45 | } |
---|
46 | |
---|
47 | /* Constants */ |
---|
48 | |
---|
49 | #define RAM_START 0 |
---|
50 | #define RAM_END 0x040000 |
---|
51 | |
---|
52 | /* Structures */ |
---|
53 | |
---|
54 | #ifdef GEN68302_INIT |
---|
55 | #undef EXTERN |
---|
56 | #define EXTERN |
---|
57 | #else |
---|
58 | #undef EXTERN |
---|
59 | #define EXTERN extern |
---|
60 | #endif |
---|
61 | |
---|
62 | /* miscellaneous stuff assumed to exist */ |
---|
63 | |
---|
64 | extern rtems_isr_entry M68Kvec[]; /* vector table address */ |
---|
65 | |
---|
66 | /* functions */ |
---|
67 | |
---|
68 | rtems_isr_entry set_vector( |
---|
69 | rtems_isr_entry handler, |
---|
70 | rtems_vector_number vector, |
---|
71 | int type |
---|
72 | ); |
---|
73 | |
---|
74 | #ifdef __cplusplus |
---|
75 | } |
---|
76 | #endif |
---|
77 | |
---|
78 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.