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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libbsp/] [sh/] [shared/] [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
 *  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
 *  Copyright assigned to U.S. Government, 1994.
32
 *
33
 *  The license and distribution terms for this file may be
34
 *  found in the file LICENSE in this distribution or at
35
 *  http://www.OARcorp.com/rtems/license.html.
36
 *
37
 *  $Id: setvec.c,v 1.2 2001-09-27 12:01:12 chris Exp $
38
 */
39
 
40
#include <rtems.h>
41
#include <bsp.h>
42
 
43
sh_isr_entry set_vector(                /* returns old vector */
44
  rtems_isr_entry     handler,          /* isr routine        */
45
  rtems_vector_number vector,           /* vector number      */
46
  int                 type              /* RTEMS or RAW intr  */
47
)
48
{
49
  sh_isr_entry previous_isr;
50
 
51
  if ( type )
52
    rtems_interrupt_catch( handler, vector, (rtems_isr_entry *) &previous_isr );
53
  else {
54
    _CPU_ISR_install_raw_handler( vector, handler, (proc_ptr*) &previous_isr );
55
  }
56
 
57
  return previous_isr;
58
}

powered by: WebSVN 2.1.0

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