source: rtems/c/src/lib/libbsp/mips/p4000/include/bsp.h @ 34c4852

4.104.114.84.95
Last change on this file since 34c4852 was 34c4852, checked in by Ralf Corsepius <ralf.corsepius@…>, on 05/26/05 at 05:36:48

2005-05-26 Ralf Corsepius <ralf.corsepius@…>

  • include/bsp.h: New header guard.
  • 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.rtems.com/license/LICENSE.
13 *
14 *  $Id$
15 */
16/* @(#)bsp.h       03/15/96     1.1 */
17
18#ifndef _BSP_H
19#define _BSP_H
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25#include <bspopts.h>
26
27#include <rtems.h>
28#include <rtems/console.h>
29#include <rtems/clockdrv.h>
30
31/*
32 *  confdefs.h overrides for this BSP:
33 *   - number of termios serial ports (defaults to 1)
34 *   - Interrupt stack space is not minimum if defined.
35 */
36
37/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
38#define CONFIGURE_INTERRUPT_STACK_MEMORY  (4 * 1024)
39
40extern void WriteDisplay( char * string );
41
42extern uint32_t   mips_get_timer( void );
43
44#define CPU_CLOCK_RATE_MHZ     (50)
45#define CLOCKS_PER_MICROSECOND ( CPU_CLOCK_RATE_MHZ ) /* equivalent to CPU clock speed in MHz */
46
47/*
48 *  Simple spin delay in microsecond units for device drivers.
49 *  This is very dependent on the clock speed of the target.
50 *
51 *  NOTE: This macro generates a warning like "integer constant out
52 *        of range" which is safe to ignore.  In 64 bit mode, uint32_t
53 *        types are actually 64 bits long so that comparisons between
54 *        uint32_t   types and pointers are valid.  The warning is caused
55 *        by code in the delay macro that is necessary for 64 bit mode.
56 */
57
58#define rtems_bsp_delay( microseconds ) \
59  { \
60     uint32_t   _end_clock = \
61          mips_get_timer() + microseconds * CLOCKS_PER_MICROSECOND; \
62     _end_clock %= 0x100000000;  /* make sure result is 32 bits */ \
63     \
64     /* handle timer overflow, if necessary */ \
65     while ( _end_clock < mips_get_timer() );  \
66     \
67     while ( _end_clock > mips_get_timer() ); \
68  }
69
70/* Constants */
71
72#define RAM_START 0
73#define RAM_END   0x100000
74
75/* miscellaneous stuff assumed to exist */
76
77extern rtems_configuration_table BSP_Configuration;
78
79/*
80 *  Device Driver Table Entries
81 */
82
83/*
84 * NOTE: Use the standard Console driver entry
85 */
86
87/*
88 * NOTE: Use the standard Clock driver entry
89 */
90
91/* miscellaneous stuff assumed to exist */
92
93mips_isr_entry set_vector(                      /* returns old vector */
94  rtems_isr_entry     handler,                  /* isr routine        */
95  rtems_vector_number vector,                   /* vector number      */
96  int                 type                      /* RTEMS or RAW intr  */
97);
98
99#ifdef __cplusplus
100}
101#endif
102
103#endif
104/* end of include file */
Note: See TracBrowser for help on using the repository browser.