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

4.104.114.84.95
Last change on this file since 7068e246 was 08311cc3, checked in by Joel Sherrill <joel.sherrill@…>, on 11/17/99 at 17:51:34

Updated copyright notice.

  • Property mode set to 100644
File size: 2.6 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#if defined(VARIANT)
31
32#define __bsp_cat(x, y) x ## y
33#define __bsp_xcat(x, y) __bsp_cat(x, y)
34#define __bsp_str(s) #s
35#define __bsp_xstr(s) __bsp_str(s)
36
37#define __BSP_HEADER_FILE__ __bsp_xcat(VARIANT, .h)
38#define __BSP_HEADER_FILE_STR__ __bsp_xstr(__BSP_HEADER_FILE__)
39
40#include __BSP_HEADER_FILE_STR__
41#endif
42 
43/*
44 *  Define the time limits for RTEMS Test Suite test durations.
45 *  Long test and short test duration limits are provided.  These
46 *  values are in seconds and need to be converted to ticks for the
47 *  application.
48 *
49 */
50
51#define MAX_LONG_TEST_DURATION       300 /* 5 minutes = 300 seconds */
52#define MAX_SHORT_TEST_DURATION      3   /* 3 seconds */
53
54/*
55 *  Stuff for Time Test 27
56 */
57
58#define MUST_WAIT_FOR_INTERRUPT 0
59
60#define Install_tm27_vector( handler ) set_vector( (handler), 0, 1 )
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/* Constants */
85
86#define RAM_START RAM_BASE
87#define RAM_END   (RAM_BASE + RAM_SIZE)
88
89/* Structures */
90
91#ifdef GEN68302_INIT
92#undef EXTERN
93#define EXTERN
94#else
95#undef EXTERN
96#define EXTERN extern
97#endif
98
99/*
100 *  Device Driver Table Entries
101 */
102
103/*
104 * NOTE: Use the standard Console driver entry
105 */
106 
107/*
108 * NOTE: Use the standard Clock driver entry
109 */
110
111/* miscellaneous stuff assumed to exist */
112
113extern rtems_configuration_table BSP_Configuration;
114
115extern m68k_isr_entry M68Kvec[];   /* vector table address */
116
117/* functions */
118
119void bsp_cleanup( void );
120
121m68k_isr_entry set_vector(
122  rtems_isr_entry     handler,
123  rtems_vector_number vector,
124  int                 type
125);
126
127#ifdef __cplusplus
128}
129#endif
130
131#endif
132/* end of include file */
Note: See TracBrowser for help on using the repository browser.