source: rtems/c/src/lib/libbsp/nios2/nios2_iss/startup/setvec.c @ f0f8e4d

4.104.115
Last change on this file since f0f8e4d was f0f8e4d, checked in by Joel Sherrill <joel.sherrill@…>, on Mar 3, 2009 at 12:10:56 AM

2009-03-02 Joel Sherrill <joel.sherrill@…>

  • Makefile.am, preinstall.am, include/bsp.h, startup/setvec.c: Now compiles again but applications do not link.
  • Property mode set to 100644
File size: 1.3 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) 2005-2006 Kolja Waschk rtemsdev/ixo.de
16 *  Derived from no_cpu/no_bsp/startup/setvec.c 1.8,
17 *  COPYRIGHT (c) 1989-1999.
18 *  On-Line Applications Research Corporation (OAR).
19 *
20 *  The license and distribution terms for this file may be
21 *  found in the file LICENSE in this distribution or at
22 *  http://www.rtems.com/license/LICENSE.
23 *
24 *  $Id$
25 */
26
27#include <rtems.h>
28#include <bsp.h>
29
30rtems_isr_entry set_vector(                    /* returns old vector */
31  rtems_isr_entry     handler,                  /* isr routine        */
32  rtems_vector_number vector,                   /* vector number      */
33  int                 type                      /* RTEMS or RAW intr  */
34)
35{
36  rtems_isr_entry previous_isr;
37
38  if ( type )
39    rtems_interrupt_catch( handler, vector, (rtems_isr_entry *) &previous_isr );
40  else {
41    /* XXX: install non-RTEMS ISR as "raw" interupt */
42  }
43  return previous_isr;
44}
Note: See TracBrowser for help on using the repository browser.