source: rtems/cpukit/score/cpu/arm/armv7m-exception-priority-set.c @ 8ae37323

4.115
Last change on this file since 8ae37323 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: 857 bytes
Line 
1/**
2 *  @file
3 *
4 *  @brief ARMV7M Set Exception Priority
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.org/license/LICENSE.
19 */
20
21#ifdef HAVE_CONFIG_H
22  #include "config.h"
23#endif
24
25#include <rtems/score/armv7m.h>
26
27#ifdef ARM_MULTILIB_ARCH_V7M
28
29void _ARMV7M_Set_exception_priority( int vector, int priority )
30{
31  if ( _ARMV7M_Is_vector_an_irq( vector ) ) {
32    _ARMV7M_NVIC_Set_priority( ARMV7M_IRQ_OF_VECTOR( vector ), priority );
33  } else if ( vector >= ARMV7M_VECTOR_MEM_MANAGE ) {
34    _ARMV7M_SCB->shpr [vector - 4] = (uint8_t) priority;
35  }
36}
37
38#endif /* ARM_MULTILIB_ARCH_V7M */
Note: See TracBrowser for help on using the repository browser.