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

4.104.114.84.95
Last change on this file since df25c998 was cf282090, checked in by Joel Sherrill <joel.sherrill@…>, on 09/28/01 at 13:28:11

2001-09-27 Joel Sherrill <joel@…>

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