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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [c/] [src/] [lib/] [libbsp/] [shared/] [setvec.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
/*  set_vector
2
 *
3
 *  This routine installs an interrupt vector on the SPARC simulator.
4
 *
5
 *  INPUT PARAMETERS:
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
 *  OUTPUT PARAMETERS:  NONE
12
 *
13
 *  RETURNS:
14
 *    address of previous interrupt handler
15
 *
16
 *  COPYRIGHT (c) 1989-1999.
17
 *  On-Line Applications Research Corporation (OAR).
18
 *
19
 *  The license and distribution terms for this file may be
20
 *  found in the file LICENSE in this distribution or at
21
 *  http://www.OARcorp.com/rtems/license.html.
22
 *
23
 */
24
 
25
#include <bsp.h>
26
 
27
rtems_isr_entry 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 previous_isr;
34
 
35
  if ( type )
36
    rtems_interrupt_catch( handler, vector, &previous_isr );
37
  else
38
    _CPU_ISR_install_raw_handler( vector, handler, (void *)&previous_isr );
39
 
40
  return previous_isr;
41
}
42
 

powered by: WebSVN 2.1.0

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