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

4.104.114.84.95
Last change on this file since 3344730a was 3344730a, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/21/04 at 16:21:25

2004-04-21 Ralf Corsepius <ralf_corsepius@…>

PR 613/bsps

  • include/bsp.h: Remove MAX_LONG_TEST_DURATION.
  • Property mode set to 100644
File size: 3.0 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.rtems.com/license/LICENSE.
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 <rtems/bspIo.h>
26#include <rtems/clockdrv.h>
27#include <rtems/console.h>
28#include <rtems/iosupp.h>
29#include <mrm332.h>
30#include <rtems/m68k/sim.h>
31#include <rtems/m68k/qsm.h>
32
33/*
34 *  confdefs.h overrides for this BSP:
35 *   - number of termios serial ports (defaults to 1)
36 *   - Interrupt stack space is not minimum if defined.
37 */
38
39#define CONSOLE_SCI
40/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
41/* #define CONFIGURE_INTERRUPT_STACK_MEMORY  (TBD * 1024) */
42
43/*
44 *  Define the interrupt mechanism for Time Test 27
45 */
46
47/* XXX - JRS - I want to compile the tmtests */
48
49#define MUST_WAIT_FOR_INTERRUPT 1
50
51#define Install_tm27_vector( handler )
52
53#define Cause_tm27_intr()
54
55#define Clear_tm27_intr()
56
57#define Lower_tm27_intr()
58
59/*
60 *  Simple spin delay in microsecond units for device drivers.
61 *  This is very dependent on the clock speed of the target.
62 */
63
64#define rtems_bsp_delay( microseconds ) \
65  { register uint32_t         _delay=(microseconds); \
66    register uint32_t         _tmp=123; \
67    asm volatile( "0: \
68                     nbcd      %0 ; \
69                     nbcd      %0 ; \
70                     dbf       %1,0b" \
71                  : "=d" (_tmp), "=d" (_delay) \
72                  : "0"  (_tmp), "1"  (_delay) ); \
73  }
74
75/* externals */
76
77extern char _etext[];
78extern char _copy_start[];
79extern char _edata[];
80extern char _clear_start[];
81extern char end[];
82extern char _copy_data_from_rom[];
83
84/* constants */
85
86#ifdef __START_C__
87#define STACK_SIZE "#0x800"
88#else
89#define STACK_SIZE 0x800
90#endif
91
92/* macros */
93
94#define RAW_PUTS(str) \
95  { register char *ptr = str; \
96    while (*ptr) SCI_output_char(*ptr++); \
97  }
98
99#define RAW_PUTI(n) { \
100    register int i, j; \
101    \
102    RAW_PUTS("0x"); \
103    for (i=28;i>=0;i -= 4) { \
104      j = (n>>i) & 0xf; \
105      SCI_output_char( (j>9 ? j-10+'a' : j+'0') ); \
106    } \
107  }
108
109/* miscellaneous stuff assumed to exist */
110
111extern rtems_configuration_table BSP_Configuration;
112
113extern m68k_isr_entry M68Kvec[];   /* vector table address */
114
115extern int stack_size;
116
117extern int stack_start;
118
119/*
120 *  Device Driver Table Entries
121 */
122
123/*
124 * NOTE: Use the standard Console driver entry
125 */
126
127/*
128 * NOTE: Use the standard Clock driver entry
129 */
130
131/* functions */
132
133void bsp_cleanup( void );
134
135m68k_isr_entry set_vector(
136  rtems_isr_entry     handler,
137  rtems_vector_number vector,
138  int                 type
139);
140
141void console_init(void);
142
143void Spurious_Initialize(void);
144
145void _UART_flush(void);
146
147void Clock_exit(void);
148
149void outbyte(char);
150
151#ifdef __cplusplus
152}
153#endif
154
155#endif
156/* end of include file */
Note: See TracBrowser for help on using the repository browser.