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

5
Last change on this file since 80cf60e was 80cf60e, checked in by Sebastian Huber <sebastian.huber@…>, on 04/15/20 at 07:48:32

Canonicalize config.h include

Use the following variant which was already used by most source files:

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

  • Property mode set to 100644
File size: 856 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
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.