source: rtems/c/src/lib/libbsp/shared/setvec.c @ 6083017

4.104.115
Last change on this file since 6083017 was 45d3b33, checked in by Joel Sherrill <joel.sherrill@…>, on 07/06/09 at 15:45:45

2009-07-06 Joel Sherrill <joel.sherrill@…>

  • setvec.c: Add CVS Id.
  • Property mode set to 100644
File size: 1.3 KB
Line 
1/*
2 *  This routine installs an interrupt vector on CPU architectures
3 *  using the Simple Vectored Interrupt Model.  This is the shared
4 *  version which does nothing BSP specific.  A BSP specific version
5 *  will be needed if you need to enable an interrupt source via
6 *  some register.
7 *
8 *  INPUT PARAMETERS:
9 *    handler - interrupt handler entry point
10 *    vector  - vector number
11 *    type    - 0 indicates raw hardware connect
12 *              1 indicates RTEMS interrupt connect
13 *
14 *  OUTPUT PARAMETERS:  NONE
15 *
16 *  RETURNS:
17 *    address of previous interrupt handler
18 *
19 *  COPYRIGHT (c) 1989-2009.
20 *  On-Line Applications Research Corporation (OAR).
21 *
22 *  The license and distribution terms for this file may be
23 *  found in the file LICENSE in this distribution or at
24 *  http://www.rtems.com/license/LICENSE.
25 *
26 *  $Id$
27 */
28
29#include <bsp.h>
30
31rtems_isr_entry set_vector(                   /* returns old vector */
32  rtems_isr_entry     handler,                /* isr routine        */
33  rtems_vector_number vector,                 /* vector number      */
34  int                 type                    /* RTEMS or RAW intr  */
35)
36{
37  rtems_isr_entry previous_isr;
38
39  if ( type )
40    rtems_interrupt_catch( handler, vector, &previous_isr );
41  else
42    _CPU_ISR_install_raw_handler( vector, handler, (void *)&previous_isr );
43
44  return previous_isr;
45}
Note: See TracBrowser for help on using the repository browser.