1 | /* bsp.h |
---|
2 | * |
---|
3 | * This include file contains some definitions specific to a board |
---|
4 | * based upon the generic capabilities of a Mongoose-V. |
---|
5 | * |
---|
6 | * COPYRIGHT (c) 1989-2001. |
---|
7 | * On-Line Applications Research Corporation (OAR). |
---|
8 | * |
---|
9 | * The license and distribution terms for this file may be |
---|
10 | * found in the file LICENSE in this distribution or at |
---|
11 | * http://www.OARcorp.com/rtems/license.html. |
---|
12 | * |
---|
13 | * $Id$ |
---|
14 | */ |
---|
15 | |
---|
16 | #ifndef __GENERIC_MONGOOSE_V_h |
---|
17 | #define __GENERIC_MONGOOSE_V_h |
---|
18 | |
---|
19 | #ifdef __cplusplus |
---|
20 | extern "C" { |
---|
21 | #endif |
---|
22 | |
---|
23 | #include <rtems.h> |
---|
24 | #include <iosupp.h> |
---|
25 | #include <console.h> |
---|
26 | #include <clockdrv.h> |
---|
27 | #include <libcpu/mongoose-v.h> |
---|
28 | |
---|
29 | /* |
---|
30 | * Define the time limits for RTEMS Test Suite test durations. |
---|
31 | * Long test and short test duration limits are provided. These |
---|
32 | * values are in seconds and need to be converted to ticks for the |
---|
33 | * application. |
---|
34 | * |
---|
35 | */ |
---|
36 | |
---|
37 | #define MAX_LONG_TEST_DURATION 300 /* 5 minutes = 300 seconds */ |
---|
38 | #define MAX_SHORT_TEST_DURATION 3 /* 3 seconds */ |
---|
39 | |
---|
40 | /* |
---|
41 | * Define the interrupt mechanism for Time Test 27 |
---|
42 | * |
---|
43 | * NOTE: Following are for XXX and are board independent |
---|
44 | * |
---|
45 | */ |
---|
46 | |
---|
47 | #define MUST_WAIT_FOR_INTERRUPT 1 |
---|
48 | |
---|
49 | #if 0 |
---|
50 | #define Install_tm27_vector( handler ) \ |
---|
51 | (void) set_vector( handler, MONGOOSEV_IRQ_SOFTWARE_1, 1 ); \ |
---|
52 | |
---|
53 | #define Cause_tm27_intr() \ |
---|
54 | asm volatile ( "syscall 0x01" : : ); |
---|
55 | |
---|
56 | #define CLOCK_VECTOR MONGOOSEV_IRQ_TMR0 |
---|
57 | |
---|
58 | #define Clear_tm27_intr() |
---|
59 | |
---|
60 | #define Lower_tm27_intr() |
---|
61 | #else |
---|
62 | #define Install_tm27_vector( handler ) \ |
---|
63 | (void) set_vector( handler, MONGOOSEV_IRQ_TMR0, 1 ); \ |
---|
64 | |
---|
65 | #define Cause_tm27_intr() \ |
---|
66 | do { \ |
---|
67 | ; \ |
---|
68 | } while(0) |
---|
69 | |
---|
70 | #define Clear_tm27_intr() |
---|
71 | |
---|
72 | #define Lower_tm27_intr() |
---|
73 | |
---|
74 | #endif |
---|
75 | |
---|
76 | /* Constants */ |
---|
77 | |
---|
78 | /* miscellaneous stuff assumed to exist */ |
---|
79 | |
---|
80 | extern rtems_configuration_table BSP_Configuration; |
---|
81 | |
---|
82 | /* |
---|
83 | * Device Driver Table Entries |
---|
84 | */ |
---|
85 | |
---|
86 | /* |
---|
87 | * NOTE: Use the standard Console driver entry |
---|
88 | */ |
---|
89 | |
---|
90 | /* |
---|
91 | * NOTE: Use the standard Clock driver entry |
---|
92 | */ |
---|
93 | |
---|
94 | /* functions */ |
---|
95 | |
---|
96 | void bsp_cleanup( void ); |
---|
97 | |
---|
98 | rtems_isr_entry set_vector( |
---|
99 | rtems_isr_entry, rtems_vector_number, int ); |
---|
100 | |
---|
101 | #ifdef __cplusplus |
---|
102 | } |
---|
103 | #endif |
---|
104 | |
---|
105 | #endif |
---|
106 | /* end of include file */ |
---|