1 | /* bsp.h |
---|
2 | * |
---|
3 | * This include file contains some definitions specific to the |
---|
4 | * BSVC simulator BSP. |
---|
5 | * |
---|
6 | * COPYRIGHT (c) 1989-2000. |
---|
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.rtems.com/license/LICENSE. |
---|
12 | * |
---|
13 | * $Id$ |
---|
14 | */ |
---|
15 | |
---|
16 | #ifndef __BSVC_SIM |
---|
17 | #define __BSVC_SIM |
---|
18 | |
---|
19 | #ifdef __cplusplus |
---|
20 | extern "C" { |
---|
21 | #endif |
---|
22 | |
---|
23 | #include <bspopts.h> |
---|
24 | |
---|
25 | #include <rtems.h> |
---|
26 | #include <rtems/iosupp.h> |
---|
27 | #include <rtems/console.h> |
---|
28 | #include <rtems/clockdrv.h> |
---|
29 | |
---|
30 | /* |
---|
31 | * Define some hardware constants here |
---|
32 | */ |
---|
33 | |
---|
34 | /* |
---|
35 | * Simple spin delay in microsecond units for device drivers. |
---|
36 | * This is very dependent on the clock speed of the target. |
---|
37 | */ |
---|
38 | |
---|
39 | #define rtems_bsp_delay( microseconds ) \ |
---|
40 | { register uint32_t _delay=(microseconds); \ |
---|
41 | register uint32_t _tmp = 0; /* initialized to avoid warning */ \ |
---|
42 | asm volatile( "0: \ |
---|
43 | remo 3,31,%0 ; \ |
---|
44 | cmpo 0,%0 ; \ |
---|
45 | subo 1,%1,%1 ; \ |
---|
46 | cmpobne.t 0,%1,0b " \ |
---|
47 | : "=d" (_tmp), "=d" (_delay) \ |
---|
48 | : "0" (_tmp), "1" (_delay) ); \ |
---|
49 | } |
---|
50 | |
---|
51 | /* Constants */ |
---|
52 | |
---|
53 | /* miscellaneous stuff assumed to exist */ |
---|
54 | |
---|
55 | extern rtems_configuration_table BSP_Configuration; |
---|
56 | |
---|
57 | /* |
---|
58 | * Device Driver Table Entries |
---|
59 | */ |
---|
60 | |
---|
61 | /* |
---|
62 | * NOTE: Use the standard Console driver entry |
---|
63 | */ |
---|
64 | |
---|
65 | /* |
---|
66 | * NOTE: Use the standard Clock driver entry |
---|
67 | */ |
---|
68 | |
---|
69 | /* functions */ |
---|
70 | |
---|
71 | void bsp_cleanup( void ); |
---|
72 | |
---|
73 | m68k_isr_entry set_vector( rtems_isr_entry, rtems_vector_number, int ); |
---|
74 | |
---|
75 | #ifdef __cplusplus |
---|
76 | } |
---|
77 | #endif |
---|
78 | |
---|
79 | #endif |
---|