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

Last change on this file since 90d8567 was c499856, checked in by Chris Johns <chrisj@…>, on Mar 20, 2014 at 9:10:47 PM

Change all references of rtems.com to rtems.org.

  • 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.org/license/LICENSE.
25 */
26
27#include <bsp.h>
28
29rtems_isr_entry set_vector(                   /* returns old vector */
30  rtems_isr_entry     handler,                /* isr routine        */
31  rtems_vector_number vector,                 /* vector number      */
32  int                 type                    /* RTEMS or RAW intr  */
33)
34{
35  rtems_isr_entry previous_isr;
36
37  if ( type )
38    rtems_interrupt_catch( handler, vector, &previous_isr );
39  else
40    _CPU_ISR_install_raw_handler( vector, handler, (void *)&previous_isr );
41
42  return previous_isr;
43}
Note: See TracBrowser for help on using the repository browser.