5
Last change
on this file since 90d8567 was
c499856,
checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47
|
Change all references of rtems.com to rtems.org.
|
-
Property mode set to
100644
|
File size:
1.3 KB
|
Rev | Line | |
---|
[45d3b33] | 1 | /* |
---|
| 2 | * This routine installs an interrupt vector on CPU architectures |
---|
| 3 | * using the Simple Vectored Interrupt Model. This is the shared |
---|
| 4 | * version which does nothing BSP specific. A BSP specific version |
---|
| 5 | * will be needed if you need to enable an interrupt source via |
---|
| 6 | * some register. |
---|
[ac49115] | 7 | * |
---|
| 8 | * INPUT PARAMETERS: |
---|
| 9 | * handler - interrupt handler entry point |
---|
| 10 | * vector - vector number |
---|
| 11 | * type - 0 indicates raw hardware connect |
---|
| 12 | * 1 indicates RTEMS interrupt connect |
---|
| 13 | * |
---|
| 14 | * OUTPUT PARAMETERS: NONE |
---|
| 15 | * |
---|
| 16 | * RETURNS: |
---|
| 17 | * address of previous interrupt handler |
---|
| 18 | * |
---|
[45d3b33] | 19 | * COPYRIGHT (c) 1989-2009. |
---|
[ac49115] | 20 | * On-Line Applications Research Corporation (OAR). |
---|
| 21 | * |
---|
| 22 | * The license and distribution terms for this file may be |
---|
| 23 | * found in the file LICENSE in this distribution or at |
---|
[c499856] | 24 | * http://www.rtems.org/license/LICENSE. |
---|
[ac49115] | 25 | */ |
---|
| 26 | |
---|
| 27 | #include <bsp.h> |
---|
| 28 | |
---|
| 29 | rtems_isr_entry set_vector( /* returns old vector */ |
---|
| 30 | rtems_isr_entry handler, /* isr routine */ |
---|
| 31 | rtems_vector_number vector, /* vector number */ |
---|
| 32 | int type /* RTEMS or RAW intr */ |
---|
| 33 | ) |
---|
| 34 | { |
---|
| 35 | rtems_isr_entry previous_isr; |
---|
| 36 | |
---|
| 37 | if ( type ) |
---|
| 38 | rtems_interrupt_catch( handler, vector, &previous_isr ); |
---|
[6128a4a] | 39 | else |
---|
[ac49115] | 40 | _CPU_ISR_install_raw_handler( vector, handler, (void *)&previous_isr ); |
---|
| 41 | |
---|
| 42 | return previous_isr; |
---|
| 43 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.