source: rtems/c/src/lib/libbsp/powerpc/dmv177/startup/setvec.c @ a69f0ad9

4.104.114.84.95
Last change on this file since a69f0ad9 was a69f0ad9, checked in by Joel Sherrill <joel.sherrill@…>, on 07/15/98 at 19:20:20

Added comments.

  • Property mode set to 100644
File size: 1.5 KB
Line 
1/*  set_vector
2 *
3 *  This routine installs an interrupt vector on the target Board/CPU.
4 *  This routine is allowed to be as board dependent as necessary.
5 *
6 *  INPUT:
7 *    handler - interrupt handler entry point
8 *    vector  - vector number
9 *    type    - 0 indicates raw hardware connect
10 *              1 indicates RTEMS interrupt connect
11 *
12 *  RETURNS:
13 *    address of previous interrupt handler
14 *
15 *  COPYRIGHT (c) 1989-1997.
16 *  On-Line Applications Research Corporation (OAR).
17 *  Copyright assigned to U.S. Government, 1994.
18 *
19 *  The license and distribution terms for this file may in
20 *  the file LICENSE in this distribution or at
21 *  http://www.OARcorp.com/rtems/license.html.
22 *
23 *  $Id$
24 */
25
26#include <rtems.h>
27#include <bsp.h>
28
29/*PAGE
30 *
31 *  set_vector
32 *
33 *  This routine installs an interrupt handler for vector.
34 */
35
36rtems_isr_entry set_vector(                    /* returns old vector */
37  rtems_isr_entry     handler,                  /* isr routine        */
38  rtems_vector_number vector,                   /* vector number      */
39  int                 type                      /* RTEMS or RAW intr  */
40)
41{
42  rtems_isr_entry previous_isr;
43  rtems_status_code status;
44
45  /*
46   * vectors greater than PPC603e_IRQ_LAST are handled by the General purpose
47   * interupt handler.
48   */
49  if ( vector > PPC_IRQ_LAST )  {
50    set_EE_vector ( handler, vector );
51  }
52  else  {
53    status = rtems_interrupt_catch(
54       handler, vector, (rtems_isr_entry *) &previous_isr );
55  }
56  return previous_isr;
57}
58
Note: See TracBrowser for help on using the repository browser.