source: rtems/c/src/lib/libbsp/m68k/ods68302/include/bsp.h @ df49c60

4.104.114.84.95
Last change on this file since df49c60 was df49c60, checked in by Joel Sherrill <joel.sherrill@…>, on 06/12/00 at 15:00:15

Merged from 4.5.0-beta3a

  • Property mode set to 100644
File size: 2.9 KB
Line 
1/*  bsp.h
2 *
3 *  This include file contains all board IO definitions.
4 *
5 *  XXX : put yours in here
6 *
7 *  COPYRIGHT (c) 1989-1999.
8 *  On-Line Applications Research Corporation (OAR).
9 *
10 *  The license and distribution terms for this file may be
11 *  found in the file LICENSE in this distribution or at
12 *  http://www.OARcorp.com/rtems/license.html.
13 *
14 *  $Id$
15 */
16
17#ifndef __GEN68302_BSP_h
18#define __GEN68302_BSP_h
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24#include <rtems.h>
25#include <console.h>
26#include <iosupp.h>
27#include <clockdrv.h>
28#include <m68302.h>
29
30/*
31 *  confdefs.h overrides for this BSP:
32 *   - number of termios serial ports (defaults to 1)
33 *   - Interrupt stack space is not minimum if defined.
34 */
35
36/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
37#define CONFIGURE_INTERRUPT_STACK_MEMORY  (4 * 1024)
38
39#if defined(VARIANT)
40
41#define __bsp_cat(x, y) x ## y
42#define __bsp_xcat(x, y) __bsp_cat(x, y)
43#define __bsp_str(s) #s
44#define __bsp_xstr(s) __bsp_str(s)
45
46#define __BSP_HEADER_FILE__ __bsp_xcat(VARIANT, .h)
47#define __BSP_HEADER_FILE_STR__ __bsp_xstr(__BSP_HEADER_FILE__)
48
49#include __BSP_HEADER_FILE_STR__
50#endif
51 
52/*
53 *  Define the time limits for RTEMS Test Suite test durations.
54 *  Long test and short test duration limits are provided.  These
55 *  values are in seconds and need to be converted to ticks for the
56 *  application.
57 *
58 */
59
60#define MAX_LONG_TEST_DURATION       300 /* 5 minutes = 300 seconds */
61#define MAX_SHORT_TEST_DURATION      3   /* 3 seconds */
62
63/*
64 *  Stuff for Time Test 27
65 */
66
67#define MUST_WAIT_FOR_INTERRUPT 0
68
69#define Install_tm27_vector( handler ) set_vector( (handler), 0, 1 )
70
71#define Cause_tm27_intr()
72
73#define Clear_tm27_intr()
74
75#define Lower_tm27_intr()
76
77/*
78 *  Simple spin delay in microsecond units for device drivers.
79 *  This is very dependent on the clock speed of the target.
80 */
81
82#define delay( microseconds ) \
83  { register rtems_unsigned32 _delay=(microseconds); \
84    register rtems_unsigned32 _tmp=123; \
85    asm volatile( "0: \
86                     nbcd      %0 ; \
87                     nbcd      %0 ; \
88                     dbf       %1,0b" \
89                  : "=d" (_tmp), "=d" (_delay) \
90                  : "0"  (_tmp), "1"  (_delay) ); \
91  }
92
93/* Constants */
94
95#define RAM_START RAM_BASE
96#define RAM_END   (RAM_BASE + RAM_SIZE)
97
98/* Structures */
99
100#ifdef GEN68302_INIT
101#undef EXTERN
102#define EXTERN
103#else
104#undef EXTERN
105#define EXTERN extern
106#endif
107
108/*
109 *  Device Driver Table Entries
110 */
111
112/*
113 * NOTE: Use the standard Console driver entry
114 */
115 
116/*
117 * NOTE: Use the standard Clock driver entry
118 */
119
120/* miscellaneous stuff assumed to exist */
121
122extern rtems_configuration_table BSP_Configuration;
123
124extern m68k_isr_entry M68Kvec[];   /* vector table address */
125
126/* functions */
127
128void bsp_cleanup( void );
129
130m68k_isr_entry set_vector(
131  rtems_isr_entry     handler,
132  rtems_vector_number vector,
133  int                 type
134);
135
136#ifdef __cplusplus
137}
138#endif
139
140#endif
141/* end of include file */
Note: See TracBrowser for help on using the repository browser.