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

4.104.114.84.95
Last change on this file since 0b48b35 was 0b48b35, checked in by Joel Sherrill <joel.sherrill@…>, on 10/12/01 at 21:07:26

2001-10-12 Joel Sherrill <joel@…>

  • clock/clock.c, console/debugio.c, include/dmv170.h, startup/setvec.c, startup/vmeintr.c: Fixed typo.
  • Property mode set to 100644
File size: 1.4 KB
RevLine 
[c932d85]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.OARcorp.com/rtems/license.html.
21 *
[a69f0ad9]22 *  $Id$
[c932d85]23 */
24
25#include <rtems.h>
26#include <bsp.h>
27
[a69f0ad9]28/*PAGE
29 *
30 *  set_vector
31 *
32 *  This routine installs an interrupt handler for vector.
33 */
34
[c932d85]35rtems_isr_entry set_vector(                    /* returns old vector */
36  rtems_isr_entry     handler,                  /* isr routine        */
37  rtems_vector_number vector,                   /* vector number      */
38  int                 type                      /* RTEMS or RAW intr  */
39)
40{
41  rtems_isr_entry previous_isr;
42  rtems_status_code status;
43
44  /*
45   * vectors greater than PPC603e_IRQ_LAST are handled by the General purpose
46   * interupt handler.
47   */
48  if ( vector > PPC_IRQ_LAST )  {
49    set_EE_vector ( handler, vector );
50  }
51  else  {
[dc104a4]52    status = rtems_interrupt_catch(
53       handler, vector, (rtems_isr_entry *) &previous_isr );
[c932d85]54  }
55  return previous_isr;
56}
57
Note: See TracBrowser for help on using the repository browser.