source: rtems/c/src/lib/libbsp/mips64orion/p4000/include/bsp.h @ afe99c2

4.104.114.84.95
Last change on this file since afe99c2 was 5bb00a8, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 11, 1996 at 7:13:44 PM

added $Id$ string to file header

  • Property mode set to 100644
File size: 3.0 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, 1990, 1991, 1992, 1993, 1994.
8 *  On-Line Applications Research Corporation (OAR).
9 *  All rights assigned to U.S. Government, 1994.
10 *
11 *  This material may be reproduced by or for the U.S. Government pursuant
12 *  to the copyright license under the clause at DFARS 252.227-7013.  This
13 *  notice must appear in all copies of this file and its derivatives.
14 *
15 *  $Id$
16 */
17/* @(#)bsp.h       03/15/96     1.1 */
18
19#ifndef __NO_BSP_h
20#define __NO_BSP_h
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26#include <rtems.h>
27#include <console.h>
28#include <clockdrv.h>
29
30extern void WriteDisplay( char * string );
31
32/*
33 *  Define the time limits for RTEMS Test Suite test durations.
34 *  Long test and short test duration limits are provided.  These
35 *  values are in seconds and need to be converted to ticks for the
36 *  application.
37 *
38 */
39
40#define MAX_LONG_TEST_DURATION       300 /* 5 minutes = 300 seconds */
41#define MAX_SHORT_TEST_DURATION      3   /* 3 seconds */
42
43/*
44 *  Stuff for Time Test 27
45 */
46
47#define MUST_WAIT_FOR_INTERRUPT 0
48
49#define Install_tm27_vector( handler ) set_vector( (handler), 0, 1 )
50
51#define Cause_tm27_intr()
52
53#define Clear_tm27_intr()
54
55#define Lower_tm27_intr()
56
57extern unsigned32 mips_get_timer( void );
58
59#define CPU_CLOCK_RATE_MHZ     (50)
60#define CLOCKS_PER_MICROSECOND ( CPU_CLOCK_RATE_MHZ ) /* equivalent to CPU clock speed in MHz */
61
62/*
63 *  Simple spin delay in microsecond units for device drivers.
64 *  This is very dependent on the clock speed of the target.
65 *
66 *  NOTE: This macro generates a warning like "integer constant out
67 *        of range" which is safe to ignore.  In 64 bit mode, unsigned32
68 *        types are actually 64 bits long so that comparisons between
69 *        unsigned32 types and pointers are valid.  The warning is caused
70 *        by code in the delay macro that is necessary for 64 bit mode.
71 */
72
73#define delay( microseconds ) \
74  { \
75     unsigned32 _end_clock = mips_get_timer() + microseconds * CLOCKS_PER_MICROSECOND; \
76     _end_clock %= 0x100000000;  /* make sure result is 32 bits */ \
77     \
78     /* handle timer overflow, if necessary */ \
79     while ( _end_clock < mips_get_timer() );  \
80     \
81     while ( _end_clock > mips_get_timer() ); \
82  }
83
84/* Constants */
85
86#define RAM_START 0
87#define RAM_END   0x100000
88
89/* miscellaneous stuff assumed to exist */
90
91extern rtems_configuration_table BSP_Configuration;
92
93/*
94 *  Device Driver Table Entries
95 */
96
97/*
98 * NOTE: Use the standard Console driver entry
99 */
100 
101/*
102 * NOTE: Use the standard Clock driver entry
103 */
104
105/*
106 * How many libio files we want
107 */
108
109#define BSP_LIBIO_MAX_FDS       20
110
111/* functions */
112
113void bsp_cleanup( void );
114
115mips_isr_entry set_vector(                    /* returns old vector */
116  rtems_isr_entry     handler,                  /* isr routine        */
117  rtems_vector_number vector,                   /* vector number      */
118  int                 type                      /* RTEMS or RAW intr  */
119);
120
121#ifdef __cplusplus
122}
123#endif
124
125#endif
126/* end of include file */
Note: See TracBrowser for help on using the repository browser.