OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libbsp/] [unix/] [posix/] [startup/] [setvec.c] - Blame information for rev 173

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*  set_vector
2
 *
3
 *  This routine installs an interrupt vector on UNIX.
4
 *
5
 *  INPUT:
6
 *    handler - interrupt handler entry point
7
 *    vector  - vector number
8
 *    type    - 0 indicates raw hardware connect
9
 *              1 indicates RTEMS interrupt connect
10
 *
11
 *  RETURNS:
12
 *    address of previous interrupt handler
13
 *
14
 *  COPYRIGHT (c) 1989-1999.
15
 *  On-Line Applications Research Corporation (OAR).
16
 *
17
 *  The license and distribution terms for this file may be
18
 *  found in the file LICENSE in this distribution or at
19
 *  http://www.OARcorp.com/rtems/license.html.
20
 *
21
 *  $Id: setvec.c,v 1.2 2001-09-27 12:01:15 chris Exp $
22
 */
23
 
24
#include <bsp.h>
25
 
26
rtems_isr_entry
27
set_vector(                                     /* returns old vector */
28
    rtems_isr_entry     handler,                /* isr routine        */
29
    rtems_vector_number vector,                 /* vector number      */
30
    int                 type                    /* RTEMS or RAW intr  */
31
)
32
{
33
    rtems_isr_entry  rtems_isr_ptr = 0;
34
    proc_ptr         raw_isr_ptr;
35
 
36
    if ( type ) {
37
      rtems_interrupt_catch( handler, vector, &rtems_isr_ptr );
38
      return rtems_isr_ptr;
39
    } else {
40
      _CPU_ISR_install_vector( vector, (proc_ptr) handler, &raw_isr_ptr );
41
      return raw_isr_ptr;
42
    }
43
 
44
}
45
 
46
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.