4.115
Last change
on this file since 18e1e5b was
e377ad7,
checked in by Sebastian Huber <sebastian.huber@…>, on 01/07/13 at 07:48:45
|
arm: Include <rtems/score/cpu.h>
|
-
Property mode set to
100644
|
File size:
910 bytes
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief CPU ISR Vector Install |
---|
5 | */ |
---|
6 | |
---|
7 | /* |
---|
8 | * Copyright (c) 2011 Sebastian Huber. All rights reserved. |
---|
9 | * |
---|
10 | * embedded brains GmbH |
---|
11 | * Obere Lagerstr. 30 |
---|
12 | * 82178 Puchheim |
---|
13 | * Germany |
---|
14 | * <rtems@embedded-brains.de> |
---|
15 | * |
---|
16 | * The license and distribution terms for this file may be |
---|
17 | * found in the file LICENSE in this distribution or at |
---|
18 | * http://www.rtems.com/license/LICENSE. |
---|
19 | */ |
---|
20 | |
---|
21 | #ifdef HAVE_CONFIG_H |
---|
22 | #include "config.h" |
---|
23 | #endif |
---|
24 | |
---|
25 | #include <rtems/score/armv7m.h> |
---|
26 | #include <rtems/score/isr.h> |
---|
27 | |
---|
28 | #ifdef ARM_MULTILIB_ARCH_V7M |
---|
29 | |
---|
30 | void _CPU_ISR_install_vector( |
---|
31 | uint32_t vector, |
---|
32 | proc_ptr new_handler, |
---|
33 | proc_ptr *old_handler |
---|
34 | ) |
---|
35 | { |
---|
36 | uint32_t level; |
---|
37 | |
---|
38 | _ISR_Disable( level ); |
---|
39 | if ( old_handler != NULL ) { |
---|
40 | *old_handler = _ARMV7M_Get_exception_handler( (int) vector ); |
---|
41 | } |
---|
42 | _ARMV7M_Set_exception_handler( (int) vector, new_handler ); |
---|
43 | _ISR_Enable( level ); |
---|
44 | } |
---|
45 | |
---|
46 | #endif /* ARM_MULTILIB_ARCH_V7M */ |
---|
Note: See
TracBrowser
for help on using the repository browser.