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

Last change on this file since 58b61b5 was 58b61b5, checked in by Joel Sherrill <joel.sherrill@…>, on 09/04/03 at 18:44:20

2003-09-04 Joel Sherrill <joel@…>

  • clock/ckinit.c, console/console.c, include/16550.h, include/DP8570A.h, include/bsp.h, spurious/spinit.c, startup/bspclean.c, startup/bspstart.c, startup/efi68k_tcp.c, startup/efi68k_wd.c, startup/setvec.c, timer/timer.c: URL for license changed.
  • Property mode set to 100644
File size: 1.2 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-1999.
15 *  On-Line Applications Research Corporation (OAR).
16 *
17 *  The license and distribution terms for this file may be
18 *  found in the file LICENSE in this distribution or at
19 *  http://www.rtems.com/license/LICENSE.
20 *
21 *  $Id$
22 */
23
24#include <bsp.h>
25
26m68k_isr_entry set_vector(                      /* returns old vector */
27  rtems_isr_entry     handler,                  /* isr routine        */
28  rtems_vector_number vector,                   /* vector number      */
29  int                 type                      /* RTEMS or RAW intr  */
30)
31{
32  int *p;
33  m68k_isr_entry  previous_isr;
34
35  if ( type )
36    rtems_interrupt_catch( handler, vector, (rtems_isr_entry *) &previous_isr );
37  else {
38    p = (int *)(vector*6-12+2+(int)_VBR);
39    previous_isr  =  (m68k_isr_entry) *p;       /* return old ISR  */
40    *p = (int) handler;    /* install new ISR */
41  }
42  return previous_isr;
43}
44
Note: See TracBrowser for help on using the repository browser.