source: rtems/c/src/lib/libbsp/m68k/efi68k/startup/setvec.c @ a858910

4.104.114.84.95
Last change on this file since a858910 was 98e4ebf5, checked in by Joel Sherrill <joel.sherrill@…>, on 10/08/97 at 15:45:54

Fixed typo in the pointer to the license terms.

  • Property mode set to 100644
File size: 1.3 KB
Line 
1/*  set_vector
2 *
3 *  This routine installs an interrupt vector on the efi68k.
4 *
5 *  INPUT:
6 *    handler - interrupt handler entry point
7 *    vector  - vector number
8 *    type    - 0 indicates raw hardware connect
9 *              1 indicates RTEMS interrupt connect
10 *
11 *  RETURNS:
12 *    address of previous interrupt handler
13 *
14 *  COPYRIGHT (c) 1989-1997.
15 *  On-Line Applications Research Corporation (OAR).
16 *  Copyright assigned to U.S. Government, 1994.
17 *
18 *  The license and distribution terms for this file may be
19 *  found in the file LICENSE in this distribution or at
20 *  http://www.OARcorp.com/rtems/license.html.
21 *
22 *  $Id$
23 */
24
25#include <bsp.h>
26
27m68k_isr_entry set_vector(                      /* returns old vector */
28  rtems_isr_entry     handler,                  /* isr routine        */
29  rtems_vector_number vector,                   /* vector number      */
30  int                 type                      /* RTEMS or RAW intr  */
31)
32{
33  int *p;
34  m68k_isr_entry  previous_isr;
35
36  if ( type )
37    rtems_interrupt_catch( handler, vector, (rtems_isr_entry *) &previous_isr );
38  else {
39    p = (int *)(vector*6-12+2+(int)_VBR);
40    previous_isr  =  (m68k_isr_entry) *p;       /* return old ISR  */
41    *p = (int) handler;    /* install new ISR */
42  }
43  return previous_isr;
44}
45
Note: See TracBrowser for help on using the repository browser.