4.104.114.84.95
Last change
on this file since 98e4ebf5 was
98e4ebf5,
checked in by Joel Sherrill <joel.sherrill@…>, on 10/08/97 at 15:45:54
|
Fixed typo in the pointer to the license terms.
|
-
Property mode set to
100644
|
File size:
1.4 KB
|
Rev | Line | |
---|
[0836603] | 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 | * |
---|
[03f2154e] | 15 | * COPYRIGHT (c) 1989-1997. |
---|
[0836603] | 16 | * On-Line Applications Research Corporation (OAR). |
---|
[03f2154e] | 17 | * Copyright assigned to U.S. Government, 1994. |
---|
[0836603] | 18 | * |
---|
[98e4ebf5] | 19 | * The license and distribution terms for this file may be |
---|
| 20 | * found in the file LICENSE in this distribution or at |
---|
[03f2154e] | 21 | * http://www.OARcorp.com/rtems/license.html. |
---|
[0836603] | 22 | * |
---|
| 23 | * $Id$ |
---|
| 24 | */ |
---|
| 25 | |
---|
| 26 | #include <rtems.h> |
---|
| 27 | #include <bsp.h> |
---|
| 28 | |
---|
| 29 | #ifndef lint |
---|
| 30 | static char _sccsid[] = "@(#)setvec.c 06/30/96 1.2\n"; |
---|
| 31 | #endif |
---|
| 32 | |
---|
| 33 | no_cpu_isr_entry set_vector( /* returns old vector */ |
---|
| 34 | rtems_isr_entry handler, /* isr routine */ |
---|
| 35 | rtems_vector_number vector, /* vector number */ |
---|
| 36 | int type /* RTEMS or RAW intr */ |
---|
| 37 | ) |
---|
| 38 | { |
---|
| 39 | no_cpu_isr_entry previous_isr; |
---|
| 40 | |
---|
| 41 | if ( type ) |
---|
| 42 | rtems_interrupt_catch( handler, vector, (rtems_isr_entry *) &previous_isr ); |
---|
| 43 | else { |
---|
| 44 | /* XXX: install non-RTEMS ISR as "raw" interupt */ |
---|
| 45 | _settrap( vector, handler ); |
---|
| 46 | } |
---|
| 47 | return previous_isr; |
---|
| 48 | } |
---|
| 49 | |
---|
Note: See
TracBrowser
for help on using the repository browser.