source: rtems/c/src/lib/libbsp/m68k/gen68340/include/bsp.h @ cf282090

4.104.114.84.95
Last change on this file since cf282090 was cf282090, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 28, 2001 at 1:28:11 PM

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

  • include/bsp.h: Renamed delay() to rtems_bsp_delay().
  • Property mode set to 100644
File size: 2.7 KB
Line 
1/*
2 * Board Support Package for `Generic' Motorola MC68340
3 *
4 * Based on the `gen68360' board support package, and covered by the
5 * original distribution terms.
6 *
7 *  $Id$
8 */
9
10/*  bsp.h
11 *
12 *  COPYRIGHT (c) 1989-1999.
13 *  On-Line Applications Research Corporation (OAR).
14 *
15 *  The license and distribution terms for this file may be
16 *  found in the file LICENSE in this distribution or at
17 *  http://www.OARcorp.com/rtems/license.html.
18 */
19
20#ifndef __GEN68340_BSP_h
21#define __GEN68340_BSP_h
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#include <bspopts.h>
28
29#include <rtems.h>
30#include <console.h>
31#include <iosupp.h>
32#include <clockdrv.h>
33
34/*
35 *  confdefs.h overrides for this BSP:
36 *   - termios serial ports (defaults to 1)
37 *   - Interrupt stack space is not minimum if defined.
38 */
39
40/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
41#define CONFIGURE_INTERRUPT_STACK_MEMORY  (4 * 1024)
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 *  Don't bother with hardware -- just use a software-interrupt
57 */
58
59#define MUST_WAIT_FOR_INTERRUPT 0
60
61#define Install_tm27_vector( handler ) set_vector( (handler), 34, 1 )
62
63#define Cause_tm27_intr()       /* asm volatile ("trap #2"); */
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 rtems_bsp_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/* Structures */
88
89/*
90 *  Device Driver Table Entries
91 */
92
93/*
94 * NOTE: Use the standard Console driver entry
95 */
96 
97/*
98 * NOTE: Use the standard Clock driver entry
99 */
100
101/*
102 * How many libio files we want
103 */
104
105#define BSP_LIBIO_MAX_FDS       20
106
107/* miscellaneous stuff assumed to exist */
108
109extern rtems_configuration_table BSP_Configuration;
110
111extern m68k_isr_entry M68Kvec[];   /* vector table address */
112
113/* functions */
114
115void bsp_cleanup( void );
116
117m68k_isr_entry set_vector(
118  rtems_isr_entry     handler,
119  rtems_vector_number vector,
120  int                 type
121);
122
123/*
124 * Values assigned by link editor
125 */
126extern void *_RomBase, *_RamBase;
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.