source: rtems/c/src/lib/libbsp/powerpc/papyrus/startup/setvec.c @ 3235ad9

4.104.114.84.95
Last change on this file since 3235ad9 was 3235ad9, checked in by Joel Sherrill <joel.sherrill@…>, on 08/23/95 at 19:30:23

Support for variable length names added to Object Handler. This supports
both fixed length "raw" names and strings from the API's point of view.

Both inline and macro implementations were tested.

  • Property mode set to 100644
File size: 2.1 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 *  Author:     Andrew Bray <andy@i-cubed.demon.co.uk>
16 *
17 *  COPYRIGHT (c) 1995 by i-cubed ltd.
18 *
19 *  To anyone who acknowledges that this file is provided "AS IS"
20 *  without any express or implied warranty:
21 *      permission to use, copy, modify, and distribute this file
22 *      for any purpose is hereby granted without fee, provided that
23 *      the above copyright notice and this notice appears in all
24 *      copies, and that the name of i-cubed limited not be used in
25 *      advertising or publicity pertaining to distribution of the
26 *      software without specific, written prior permission.
27 *      i-cubed limited makes no representations about the suitability
28 *      of this software for any purpose.
29 *
30 *  Derived from c/src/lib/libbsp/no_cpu/no_bsp/startup/setvec.c:
31 *
32 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
33 *  On-Line Applications Research Corporation (OAR).
34 *  All rights assigned to U.S. Government, 1994.
35 *
36 *  This material may be reproduced by or for the U.S. Government pursuant
37 *  to the copyright license under the clause at DFARS 252.227-7013.  This
38 *  notice must appear in all copies of this file and its derivatives.
39 *
40 *  setvec.c,v 1.2 1995/05/31 16:56:35 joel Exp
41 */
42
43#include <rtems.h>
44#include <bsp.h>
45
46rtems_isr_entry set_vector(                    /* returns old vector */
47  rtems_isr_entry     handler,                  /* isr routine        */
48  rtems_vector_number vector,                   /* vector number      */
49  int                 type                      /* RTEMS or RAW intr  */
50)
51{
52  rtems_isr_entry previous_isr;
53
54  rtems_interrupt_catch( handler, vector, (rtems_isr_entry *) &previous_isr );
55
56  return previous_isr;
57}
58
Note: See TracBrowser for help on using the repository browser.