source: rtems/c/src/lib/libbsp/sh/shared/setvec.c @ 10aec3b4

4.104.114.84.95
Last change on this file since 10aec3b4 was 10aec3b4, checked in by Joel Sherrill <joel.sherrill@…>, on Oct 12, 2001 at 9:05:11 PM

2001-10-12 Joel Sherrill <joel@…>

  • console.c, setvec.c: Fixed typo.
  • Property mode set to 100644
File size: 1.7 KB
Line 
1/*  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 *  $Id$
37 */
38
39#include <rtems.h>
40#include <bsp.h>
41
42sh_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}
Note: See TracBrowser for help on using the repository browser.