source: rtems/c/src/lib/libbsp/powerpc/ppcn_60x/startup/setvec.c @ 2e05348

4.104.114.84.95
Last change on this file since 2e05348 was 2e05348, checked in by Joel Sherrill <joel.sherrill@…>, on 09/04/03 at 18:52:29

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

  • clock/clock.c, console/console.c, console/debugio.c, console/ns16550cfg.c, console/ns16550cfg.h, console/z85c30cfg.c, console/z85c30cfg.h, include/tod.h, startup/bspstart.c, startup/genpvec.c, startup/rtems-ctor.cc, startup/setvec.c, timer/timer.c: URL for license changed.
  • 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 *
18 *  The license and distribution terms for this file may in
19 *  the file LICENSE in this distribution or at
20 *  http://www.rtems.com/license/LICENSE.
21 *
22 *  $Id:
23 */
24
25#include <rtems.h>
26#include <bsp.h>
27
28
29/*
30 *  This routine installs vector number vector.
31 * 
32 */
33rtems_isr_entry set_vector(                    /* returns old vector */
34  rtems_isr_entry     handler,                  /* isr routine        */
35  rtems_vector_number vector,                   /* vector number      */
36  int                 type                      /* RTEMS or RAW intr  */
37)
38{
39  rtems_isr_entry previous_isr;
40  rtems_status_code status;
41
42  /*
43   * vectors greater than PPC_IRQ_LAST are handled by the General purpose
44   * interupt handler. (8259)
45   */
46  if ( vector > PPC_IRQ_LAST )  {
47    set_EE_vector ( handler, vector );
48  }
49  else  {
50    status = rtems_interrupt_catch
51           ( handler, vector, (rtems_isr_entry *) &previous_isr );
52  }
53  return previous_isr;
54}
Note: See TracBrowser for help on using the repository browser.