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

4.104.114.84.95
Last change on this file since 98e4ebf was 98e4ebf, checked in by Joel Sherrill <joel.sherrill@…>, on Oct 8, 1997 at 3:45:54 PM

Fixed typo in the pointer to the license terms.

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