4.115
Last change
on this file since c499856 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:
858 bytes
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief ARMV7M Get Exception Priority |
---|
5 | */ |
---|
6 | /* |
---|
7 | * Copyright (c) 2011 Sebastian Huber. All rights reserved. |
---|
8 | * |
---|
9 | * embedded brains GmbH |
---|
10 | * Obere Lagerstr. 30 |
---|
11 | * 82178 Puchheim |
---|
12 | * Germany |
---|
13 | * <rtems@embedded-brains.de> |
---|
14 | * |
---|
15 | * The license and distribution terms for this file may be |
---|
16 | * found in the file LICENSE in this distribution or at |
---|
17 | * http://www.rtems.org/license/LICENSE. |
---|
18 | */ |
---|
19 | |
---|
20 | #ifdef HAVE_CONFIG_H |
---|
21 | #include "config.h" |
---|
22 | #endif |
---|
23 | |
---|
24 | #include <rtems/score/armv7m.h> |
---|
25 | |
---|
26 | #ifdef ARM_MULTILIB_ARCH_V7M |
---|
27 | |
---|
28 | int _ARMV7M_Get_exception_priority( int vector ) |
---|
29 | { |
---|
30 | if ( _ARMV7M_Is_vector_an_irq( vector ) ) { |
---|
31 | return _ARMV7M_NVIC_Get_priority( ARMV7M_IRQ_OF_VECTOR( vector ) ); |
---|
32 | } else if ( vector >= ARMV7M_VECTOR_MEM_MANAGE ) { |
---|
33 | return _ARMV7M_SCB->shpr [vector - 4]; |
---|
34 | } else { |
---|
35 | return vector - 4; |
---|
36 | } |
---|
37 | } |
---|
38 | |
---|
39 | #endif /* ARM_MULTILIB_ARCH_V7M */ |
---|
Note: See
TracBrowser
for help on using the repository browser.