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, 1990, 1991, 1992, 1993, 1994. |
---|
8 | * On-Line Applications Research Corporation (OAR). |
---|
9 | * All rights assigned to U.S. Government, 1994. |
---|
10 | * |
---|
11 | * This material may be reproduced by or for the U.S. Government pursuant |
---|
12 | * to the copyright license under the clause at DFARS 252.227-7013. This |
---|
13 | * notice must appear in all copies of this file and its derivatives. |
---|
14 | * |
---|
15 | * bsp.h,v 1.4 1995/09/11 19:29:04 joel Exp |
---|
16 | */ |
---|
17 | /* @(#)bsp.h 03/15/96 1.1 */ |
---|
18 | |
---|
19 | #ifndef __NO_BSP_h |
---|
20 | #define __NO_BSP_h |
---|
21 | |
---|
22 | #ifdef __cplusplus |
---|
23 | extern "C" { |
---|
24 | #endif |
---|
25 | |
---|
26 | #include <rtems.h> |
---|
27 | #include <console.h> |
---|
28 | #include <clockdrv.h> |
---|
29 | |
---|
30 | extern void WriteDisplay( char * string ); |
---|
31 | |
---|
32 | /* |
---|
33 | * Define the time limits for RTEMS Test Suite test durations. |
---|
34 | * Long test and short test duration limits are provided. These |
---|
35 | * values are in seconds and need to be converted to ticks for the |
---|
36 | * application. |
---|
37 | * |
---|
38 | */ |
---|
39 | |
---|
40 | #define MAX_LONG_TEST_DURATION 300 /* 5 minutes = 300 seconds */ |
---|
41 | #define MAX_SHORT_TEST_DURATION 3 /* 3 seconds */ |
---|
42 | |
---|
43 | /* |
---|
44 | * Stuff for Time Test 27 |
---|
45 | */ |
---|
46 | |
---|
47 | #define MUST_WAIT_FOR_INTERRUPT 0 |
---|
48 | |
---|
49 | #define Install_tm27_vector( handler ) set_vector( (handler), 0, 1 ) |
---|
50 | |
---|
51 | #define Cause_tm27_intr() |
---|
52 | |
---|
53 | #define Clear_tm27_intr() |
---|
54 | |
---|
55 | #define Lower_tm27_intr() |
---|
56 | |
---|
57 | extern unsigned32 mips_get_timer( void ); |
---|
58 | |
---|
59 | #define CPU_CLOCK_RATE_MHZ (50) |
---|
60 | #define CLOCKS_PER_MICROSECOND ( CPU_CLOCK_RATE_MHZ ) /* equivalent to CPU clock speed in MHz */ |
---|
61 | |
---|
62 | /* |
---|
63 | * Simple spin delay in microsecond units for device drivers. |
---|
64 | * This is very dependent on the clock speed of the target. |
---|
65 | */ |
---|
66 | |
---|
67 | #define delay( microseconds ) \ |
---|
68 | { \ |
---|
69 | unsigned32 _end_clock = mips_get_timer() + microseconds * CLOCKS_PER_MICROSECOND; \ |
---|
70 | _end_clock %= 0x100000000; /* make sure result is 32 bits */ \ |
---|
71 | \ |
---|
72 | /* handle timer overflow, if necessary */ \ |
---|
73 | while ( _end_clock < mips_get_timer() ); \ |
---|
74 | \ |
---|
75 | while ( _end_clock > mips_get_timer() ); \ |
---|
76 | } |
---|
77 | |
---|
78 | /* Constants */ |
---|
79 | |
---|
80 | #define RAM_START 0 |
---|
81 | #define RAM_END 0x100000 |
---|
82 | |
---|
83 | /* miscellaneous stuff assumed to exist */ |
---|
84 | |
---|
85 | extern rtems_configuration_table BSP_Configuration; |
---|
86 | |
---|
87 | /* |
---|
88 | * Device Driver Table Entries |
---|
89 | */ |
---|
90 | |
---|
91 | /* |
---|
92 | * NOTE: Use the standard Console driver entry |
---|
93 | */ |
---|
94 | |
---|
95 | /* |
---|
96 | * NOTE: Use the standard Clock driver entry |
---|
97 | */ |
---|
98 | |
---|
99 | /* |
---|
100 | * How many libio files we want |
---|
101 | */ |
---|
102 | |
---|
103 | #define BSP_LIBIO_MAX_FDS 20 |
---|
104 | |
---|
105 | /* functions */ |
---|
106 | |
---|
107 | void bsp_cleanup( void ); |
---|
108 | |
---|
109 | mips_isr_entry set_vector( /* returns old vector */ |
---|
110 | rtems_isr_entry handler, /* isr routine */ |
---|
111 | rtems_vector_number vector, /* vector number */ |
---|
112 | int type /* RTEMS or RAW intr */ |
---|
113 | ); |
---|
114 | |
---|
115 | #ifdef __cplusplus |
---|
116 | } |
---|
117 | #endif |
---|
118 | |
---|
119 | #endif |
---|
120 | /* end of include file */ |
---|