source: rtems/c/src/lib/libbsp/sh/shared/setvec.c @ 766ed7c

4.104.114.84.95
Last change on this file since 766ed7c was f8b27df9, checked in by Joel Sherrill <joel.sherrill@…>, on 03/20/98 at 17:20:45

New port from Ralf Corsepius <corsepiu@…>.

  • Property mode set to 100644
File size: 1.6 KB
Line 
1/*  set_vector
2 *
3 *  This routine installs an interrupt vector on the target Board/CPU.
4 *  This routine is allowed to be as board dependent as necessary.
5 *
6 *  INPUT:
7 *    handler - interrupt handler entry point
8 *    vector  - vector number
9 *    type    - 0 indicates raw hardware connect
10 *              1 indicates RTEMS interrupt connect
11 *
12 *  RETURNS:
13 *    address of previous interrupt handler
14 *
15 *  Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and
16 *           Bernd Becker (becker@faw.uni-ulm.de)
17 *
18 *  COPYRIGHT (c) 1997-1998, FAW Ulm, Germany
19 *
20 *  This program is distributed in the hope that it will be useful,
21 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
22 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
23 *
24 *
25 *  COPYRIGHT (c) 1998.
26 *  On-Line Applications Research Corporation (OAR).
27 *  Copyright assigned to U.S. Government, 1994.
28 *
29 *  The license and distribution terms for this file may be
30 *  found in the file LICENSE in this distribution or at
31 *  http://www.OARcorp.com/rtems/license.html.
32 *
33 *  $Id$
34 */
35
36#include <rtems.h>
37#include <bsp.h>
38
39sh_isr_entry set_vector(                /* returns old vector */
40  rtems_isr_entry     handler,          /* isr routine        */
41  rtems_vector_number vector,           /* vector number      */
42  int                 type              /* RTEMS or RAW intr  */
43)
44{
45  sh_isr_entry previous_isr;
46
47  if ( type )
48    rtems_interrupt_catch( handler, vector, (rtems_isr_entry *) &previous_isr );
49  else {
50    _CPU_ISR_install_raw_handler( vector, handler, (proc_ptr*) &previous_isr );
51  }
52
53  return previous_isr;
54}
55
Note: See TracBrowser for help on using the repository browser.