source: rtems/c/src/lib/libbsp/m68k/shared/setvec.c @ ecc4594

4.104.114.84.95
Last change on this file since ecc4594 was ecc4594, checked in by Joel Sherrill <joel.sherrill@…>, on 04/15/97 at 17:28:26

Removed many BSPs' copy of setvec.c and let them share the same
implementation as all m68k BSPs.

  • Property mode set to 100644
File size: 1.4 KB
Line 
1/* 
2 *
3 *  This routine installs an interrupt vector using the basic
4 *  RTEMS mechanisms.  This implementation should be suitable for
5 *  most m68k based boards.  However, if the board has an unusual
6 *  interrupt controller or most somehow manipulate board specific
7 *  hardware to enable/disable, mask, prioritize, etc an interrupt
8 *  source, then this routine should be customized to support that.
9 *
10 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1997.
11 *  On-Line Applications Research Corporation (OAR).
12 *  All rights assigned to U.S. Government, 1994.
13 *
14 *  This material may be reproduced by or for the U.S. Government pursuant
15 *  to the copyright license under the clause at DFARS 252.227-7013.  This
16 *  notice must appear in all copies of this file and its derivatives.
17 *
18 *  $Id$
19 */
20
21#include <rtems.h>
22#include <bsp.h>
23
24m68k_isr_entry set_vector(                      /* returns old vector */
25  rtems_isr_entry     handler,                  /* isr routine        */
26  rtems_vector_number vector,                   /* vector number      */
27  int                 type                      /* RTEMS or RAW intr  */
28)
29{
30  m68k_isr_entry  previous_isr;
31
32  if ( type )
33    rtems_interrupt_catch( handler, vector, (rtems_isr_entry *) &previous_isr );
34  else {
35    _CPU_ISR_install_raw_handler( vector, handler, (void *)&previous_isr );
36  }
37  return previous_isr;
38}
39
Note: See TracBrowser for help on using the repository browser.