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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [c/] [src/] [lib/] [libbsp/] [sh/] [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
 *  NOTE: This function is considered OBSOLETE and may vanish soon.
4
 *      Calls to set_vector should be replaced by calls to
5
 *      rtems_interrupt_catch or _CPU_ISR_install_raw_handler.
6
 *
7
 *  This routine installs an interrupt vector on the target Board/CPU.
8
 *  This routine is allowed to be as board dependent as necessary.
9
 *
10
 *  INPUT:
11
 *    handler - interrupt handler entry point
12
 *    vector  - vector number
13
 *    type    - 0 indicates raw hardware connect
14
 *              1 indicates RTEMS interrupt connect
15
 *
16
 *  RETURNS:
17
 *    address of previous interrupt handler
18
 *
19
 *  Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and
20
 *           Bernd Becker (becker@faw.uni-ulm.de)
21
 *
22
 *  COPYRIGHT (c) 1997-1998, FAW Ulm, Germany
23
 *
24
 *  This program is distributed in the hope that it will be useful,
25
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
26
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
27
 *
28
 *
29
 *  COPYRIGHT (c) 1998.
30
 *  On-Line Applications Research Corporation (OAR).
31
 *
32
 *  The license and distribution terms for this file may be
33
 *  found in the file LICENSE in this distribution or at
34
 *  http://www.OARcorp.com/rtems/license.html.
35
 *
36
 *  setvec.c,v 1.3 2001/10/12 21:05:11 joel Exp
37
 */
38
 
39
#include <rtems.h>
40
#include <bsp.h>
41
 
42
sh_isr_entry set_vector(                /* returns old vector */
43
  rtems_isr_entry     handler,          /* isr routine        */
44
  rtems_vector_number vector,           /* vector number      */
45
  int                 type              /* RTEMS or RAW intr  */
46
)
47
{
48
  sh_isr_entry previous_isr;
49
 
50
  if ( type )
51
    rtems_interrupt_catch( handler, vector, (rtems_isr_entry *) &previous_isr );
52
  else {
53
    _CPU_ISR_install_raw_handler( vector, handler, (proc_ptr*) &previous_isr );
54
  }
55
 
56
  return previous_isr;
57
}

powered by: WebSVN 2.1.0

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