OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libbsp/] [powerpc/] [dmv177/] [startup/] [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
 *  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
 *  COPYRIGHT (c) 1989-1997.
16
 *  On-Line Applications Research Corporation (OAR).
17
 *  Copyright assigned to U.S. Government, 1994.
18
 *
19
 *  The license and distribution terms for this file may in
20
 *  the file LICENSE in this distribution or at
21
 *  http://www.OARcorp.com/rtems/license.html.
22
 *
23
 *  $Id: setvec.c,v 1.2 2001-09-27 12:00:35 chris Exp $
24
 */
25
 
26
#include <rtems.h>
27
#include <bsp.h>
28
 
29
/*PAGE
30
 *
31
 *  set_vector
32
 *
33
 *  This routine installs an interrupt handler for vector.
34
 */
35
 
36
rtems_isr_entry set_vector(                    /* returns old vector */
37
  rtems_isr_entry     handler,                  /* isr routine        */
38
  rtems_vector_number vector,                   /* vector number      */
39
  int                 type                      /* RTEMS or RAW intr  */
40
)
41
{
42
  rtems_isr_entry previous_isr;
43
  rtems_status_code status;
44
 
45
  /*
46
   * vectors greater than PPC603e_IRQ_LAST are handled by the General purpose
47
   * interupt handler.
48
   */
49
  if ( vector > PPC_IRQ_LAST )  {
50
    set_EE_vector ( handler, vector );
51
  }
52
  else  {
53
    status = rtems_interrupt_catch(
54
       handler, vector, (rtems_isr_entry *) &previous_isr );
55
  }
56
  return previous_isr;
57
}
58
 

powered by: WebSVN 2.1.0

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