source: rtems/c/src/lib/libbsp/m68k/mrm332/include/bsp.h @ c4d92216

4.104.114.84.95
Last change on this file since c4d92216 was c4d92216, checked in by Joel Sherrill <joel.sherrill@…>, on 06/18/01 at 16:54:47

2001-05-26 Ralf Corsepius <corsepiu@…>

  • configure.in: Add bspopts.h.
  • include/.cvsignore: Add bspopts.h*, stamp-h*.
  • include/Makefile.am: Use *_HEADERS instead of *H_FILES.
  • include/bsp.h: Include bspopts.h.
  • Property mode set to 100644
File size: 3.2 KB
Line 
1/*  bsp.h
2 *
3 *  This include file contains all mrm board IO definitions.
4 *
5 *  COPYRIGHT (c) 1989-1999.
6 *  On-Line Applications Research Corporation (OAR).
7 *
8 *  The license and distribution terms for this file may be
9 *  found in the file LICENSE in this distribution or at
10 *  http://www.OARcorp.com/rtems/license.html.
11 *
12 *  $Id$
13 */
14
15#ifndef __MRM332_BSP_h
16#define __MRM332_BSP_h
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22#include <bspopts.h>
23
24#include <rtems.h>
25#include <clockdrv.h>
26#include <console.h>
27#include <iosupp.h>
28#include <mrm332.h>
29#include <sim.h>
30#include <qsm.h>
31
32/*
33 *  confdefs.h overrides for this BSP:
34 *   - number of termios serial ports (defaults to 1)
35 *   - Interrupt stack space is not minimum if defined.
36 */
37
38/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
39/* #define CONFIGURE_INTERRUPT_STACK_MEMORY  (TBD * 1024) */
40
41/*
42 *  Define the time limits for RTEMS Test Suite test durations.
43 *  Long test and short test duration limits are provided.  These
44 *  values are in seconds and need to be converted to ticks for the
45 *  application.
46 *
47 */
48
49#define MAX_LONG_TEST_DURATION       300 /* 5 minutes = 300 seconds */
50#define MAX_SHORT_TEST_DURATION      3   /* 3 seconds */
51
52/*
53 *  Define the interrupt mechanism for Time Test 27
54 */
55
56/* XXX - JRS - I want to compile the tmtests */
57
58#define MUST_WAIT_FOR_INTERRUPT 1
59
60#define Install_tm27_vector( handler )
61
62#define Cause_tm27_intr()
63
64#define Clear_tm27_intr()
65
66#define Lower_tm27_intr()
67
68/*
69 *  Simple spin delay in microsecond units for device drivers.
70 *  This is very dependent on the clock speed of the target.
71 */
72
73#define delay( microseconds ) \
74  { register rtems_unsigned32 _delay=(microseconds); \
75    register rtems_unsigned32 _tmp=123; \
76    asm volatile( "0: \
77                     nbcd      %0 ; \
78                     nbcd      %0 ; \
79                     dbf       %1,0b" \
80                  : "=d" (_tmp), "=d" (_delay) \
81                  : "0"  (_tmp), "1"  (_delay) ); \
82  }
83
84/* externals */
85
86extern char _etext[];
87extern char _copy_start[];
88extern char _edata[];
89extern char _clear_start[];
90extern char end[];
91extern char _copy_data_from_rom[];
92
93/* constants */
94
95#ifdef __START_C__
96#define STACK_SIZE "#0x800"
97#else
98#define STACK_SIZE 0x800
99#endif
100
101/* macros */
102
103#define RAW_PUTS(str) \
104  { register char *ptr = str; \
105    while (*ptr) outbyte(*ptr++); \
106  }
107
108#define RAW_PUTI(n) { \
109    register int i, j; \
110    \
111    RAW_PUTS("0x"); \
112    for (i=28;i>=0;i -= 4) { \
113      j = (n>>i) & 0xf; \
114      outbyte( (j>9 ? j-10+'a' : j+'0') ); \
115    } \
116  }
117
118/* miscellaneous stuff assumed to exist */
119
120extern rtems_configuration_table BSP_Configuration;
121
122extern m68k_isr_entry M68Kvec[];   /* vector table address */
123
124extern int stack_size;
125
126extern int stack_start;
127
128/*
129 *  Device Driver Table Entries
130 */
131 
132/*
133 * NOTE: Use the standard Console driver entry
134 */
135 
136/*
137 * NOTE: Use the standard Clock driver entry
138 */
139
140/* functions */
141
142void bsp_cleanup( void );
143
144m68k_isr_entry set_vector(
145  rtems_isr_entry     handler,
146  rtems_vector_number vector,
147  int                 type
148);
149
150void console_init(void);
151
152void Spurious_Initialize(void);
153
154void _UART_flush(void);
155
156void Clock_exit(void);
157
158void outbyte(char);
159
160#ifdef __cplusplus
161}
162#endif
163
164#endif
165/* end of include file */
Note: See TracBrowser for help on using the repository browser.