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

4.104.114.84.95
Last change on this file since dc104a4 was dc104a4, checked in by Joel Sherrill <joel.sherrill@…>, on 05/30/98 at 11:46:21

Updated to current source and removed warnings.

  • Property mode set to 100644
File size: 1.4 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
29rtems_isr_entry set_vector(                    /* returns old vector */
30  rtems_isr_entry     handler,                  /* isr routine        */
31  rtems_vector_number vector,                   /* vector number      */
32  int                 type                      /* RTEMS or RAW intr  */
33)
34{
35  rtems_isr_entry previous_isr;
36  rtems_status_code status;
37
38  /*
39   * vectors greater than PPC603e_IRQ_LAST are handled by the General purpose
40   * interupt handler.
41   */
42  if ( vector > PPC_IRQ_LAST )  {
43    set_EE_vector ( handler, vector );
44  }
45  else  {
46    status = rtems_interrupt_catch(
47       handler, vector, (rtems_isr_entry *) &previous_isr );
48  }
49  return previous_isr;
50}
51
Note: See TracBrowser for help on using the repository browser.