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

4.104.114.84.95
Last change on this file since d8ff793 was bd9c3d1, checked in by Joel Sherrill <joel.sherrill@…>, on Apr 15, 1998 at 8:50:31 PM

Numerous changes which in total greatly reduced the amount of source
code in each BSP's bspstart.c. These changes were:

+ confdefs.h now knows libio's semaphore requirements
+ shared/main.c now copies Configuration to BSP_Configuration
+ shared/main.c fills in the Cpu_table with default values

This removed the need for rtems_libio_config() and the constant
BSP_LIBIO_MAX_FDS in every BSP. Plus now the maximum number of open
files can now be set on the gcc command line.

  • Property mode set to 100644
File size: 2.7 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-1998.
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/* miscellaneous stuff assumed to exist */
113
114extern rtems_configuration_table BSP_Configuration;
115
116extern m68k_isr_entry M68Kvec[];   /* vector table address */
117
118/* functions */
119
120void bsp_cleanup( void );
121
122m68k_isr_entry set_vector(
123  rtems_isr_entry     handler,
124  rtems_vector_number vector,
125  int                 type
126);
127
128#ifdef __cplusplus
129}
130#endif
131
132#endif
133/* end of include file */
Note: See TracBrowser for help on using the repository browser.