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

4.104.114.84.95
Last change on this file since 0df29b07 was 0df29b07, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/22/04 at 15:41:35

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

  • include/bsp.h: Split out tmtest27 support.
  • include/tm27.h: New.
  • Property mode set to 100644
File size: 2.7 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 *  Simple spin delay in microsecond units for device drivers.
45 *  This is very dependent on the clock speed of the target.
46 */
47
48#define rtems_bsp_delay( microseconds ) \
49  { register uint32_t         _delay=(microseconds); \
50    register uint32_t         _tmp=123; \
51    asm volatile( "0: \
52                     nbcd      %0 ; \
53                     nbcd      %0 ; \
54                     dbf       %1,0b" \
55                  : "=d" (_tmp), "=d" (_delay) \
56                  : "0"  (_tmp), "1"  (_delay) ); \
57  }
58
59/* externals */
60
61extern char _etext[];
62extern char _copy_start[];
63extern char _edata[];
64extern char _clear_start[];
65extern char end[];
66extern char _copy_data_from_rom[];
67
68/* constants */
69
70#ifdef __START_C__
71#define STACK_SIZE "#0x800"
72#else
73#define STACK_SIZE 0x800
74#endif
75
76/* macros */
77
78#define RAW_PUTS(str) \
79  { register char *ptr = str; \
80    while (*ptr) SCI_output_char(*ptr++); \
81  }
82
83#define RAW_PUTI(n) { \
84    register int i, j; \
85    \
86    RAW_PUTS("0x"); \
87    for (i=28;i>=0;i -= 4) { \
88      j = (n>>i) & 0xf; \
89      SCI_output_char( (j>9 ? j-10+'a' : j+'0') ); \
90    } \
91  }
92
93/* miscellaneous stuff assumed to exist */
94
95extern rtems_configuration_table BSP_Configuration;
96
97extern m68k_isr_entry M68Kvec[];   /* vector table address */
98
99extern int stack_size;
100
101extern int stack_start;
102
103/*
104 *  Device Driver Table Entries
105 */
106
107/*
108 * NOTE: Use the standard Console driver entry
109 */
110
111/*
112 * NOTE: Use the standard Clock driver entry
113 */
114
115/* functions */
116
117void bsp_cleanup( void );
118
119m68k_isr_entry set_vector(
120  rtems_isr_entry     handler,
121  rtems_vector_number vector,
122  int                 type
123);
124
125void console_init(void);
126
127void Spurious_Initialize(void);
128
129void _UART_flush(void);
130
131void Clock_exit(void);
132
133void outbyte(char);
134
135#ifdef __cplusplus
136}
137#endif
138
139#endif
140/* end of include file */
Note: See TracBrowser for help on using the repository browser.