source: rtems/cpukit/score/cpu/arm/armv7m-exception-priority-get.c @ d9bd5cd6

4.115
Last change on this file since d9bd5cd6 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: 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.com/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
28int _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.