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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libbsp/] [powerpc/] [ppcn_60x/] [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:
24
 */
25
 
26
#include <rtems.h>
27
#include <bsp.h>
28
 
29
 
30
/*
31
 *  This routine installs vector number vector.
32
 *
33
 */
34
rtems_isr_entry set_vector(                    /* returns old vector */
35
  rtems_isr_entry     handler,                  /* isr routine        */
36
  rtems_vector_number vector,                   /* vector number      */
37
  int                 type                      /* RTEMS or RAW intr  */
38
)
39
{
40
  rtems_isr_entry previous_isr;
41
  rtems_status_code status;
42
 
43
  /*
44
   * vectors greater than PPC_IRQ_LAST are handled by the General purpose
45
   * interupt handler. (8259)
46
   */
47
  if ( vector > PPC_IRQ_LAST )  {
48
    set_EE_vector ( handler, vector );
49
  }
50
  else  {
51
    status = rtems_interrupt_catch
52
           ( handler, vector, (rtems_isr_entry *) &previous_isr );
53
  }
54
  return previous_isr;
55
}

powered by: WebSVN 2.1.0

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