2013-07-18 23:20:47 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* arch/arm/include/armv7-a/irq.h
|
|
|
|
*
|
2014-06-21 02:16:41 +02:00
|
|
|
* Copyright (C) 2013-2014 Gregory Nutt. All rights reserved.
|
2013-07-18 23:20:47 +02:00
|
|
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
*
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in
|
|
|
|
* the documentation and/or other materials provided with the
|
|
|
|
* distribution.
|
|
|
|
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
|
|
* used to endorse or promote products derived from this software
|
|
|
|
* without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
|
|
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
|
|
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
|
|
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
|
|
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
|
|
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
|
|
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
* POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
/* This file should never be included directed but, rather, only indirectly
|
|
|
|
* through nuttx/irq.h
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ARCH_ARM_INCLUDE_ARMV7_A_IRQ_H
|
|
|
|
#define __ARCH_ARM_INCLUDE_ARMV7_A_IRQ_H
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Included Files
|
|
|
|
****************************************************************************/
|
|
|
|
|
2014-06-21 17:55:09 +02:00
|
|
|
#include <nuttx/config.h>
|
2013-07-18 23:20:47 +02:00
|
|
|
#include <nuttx/irq.h>
|
2014-06-21 17:55:09 +02:00
|
|
|
|
2013-07-18 23:20:47 +02:00
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
# include <stdint.h>
|
2014-08-25 21:28:13 +02:00
|
|
|
# include <arch/arch.h>
|
2013-07-18 23:20:47 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/****************************************************************************
|
2014-08-28 22:52:14 +02:00
|
|
|
* Pre-processor Definitions
|
2013-07-18 23:20:47 +02:00
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
/* IRQ Stack Frame Format:
|
|
|
|
*
|
|
|
|
* Context is always saved/restored in the same way:
|
|
|
|
*
|
|
|
|
* (1) stmia rx, {r0-r14}
|
|
|
|
* (2) then the PC and CPSR
|
|
|
|
*
|
2014-04-14 00:22:22 +02:00
|
|
|
* This results in the following set of indices that can be used to access
|
2013-07-24 01:52:06 +02:00
|
|
|
* individual registers in the xcp.regs array:
|
2013-07-18 23:20:47 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#define REG_R0 (0)
|
|
|
|
#define REG_R1 (1)
|
|
|
|
#define REG_R2 (2)
|
|
|
|
#define REG_R3 (3)
|
|
|
|
#define REG_R4 (4)
|
|
|
|
#define REG_R5 (5)
|
|
|
|
#define REG_R6 (6)
|
|
|
|
#define REG_R7 (7)
|
|
|
|
#define REG_R8 (8)
|
|
|
|
#define REG_R9 (9)
|
|
|
|
#define REG_R10 (10)
|
|
|
|
#define REG_R11 (11)
|
|
|
|
#define REG_R12 (12)
|
|
|
|
#define REG_R13 (13)
|
|
|
|
#define REG_R14 (14)
|
|
|
|
#define REG_R15 (15)
|
|
|
|
#define REG_CPSR (16)
|
|
|
|
|
2013-07-24 01:52:06 +02:00
|
|
|
#define ARM_CONTEXT_REGS (17)
|
|
|
|
|
|
|
|
/* If the MCU supports a floating point unit, then it will be necessary
|
|
|
|
* to save the state of the FPU status register and data registers on
|
|
|
|
* each context switch. These registers are not saved during interrupt
|
|
|
|
* level processing, however. So, as a consequence, floating point
|
|
|
|
* operations may NOT be performed in interrupt handlers.
|
|
|
|
*
|
|
|
|
* The FPU provides an extension register file containing 32 single-
|
|
|
|
* precision registers. These can be viewed as:
|
|
|
|
*
|
2014-06-21 17:55:09 +02:00
|
|
|
* - Sixteen 64-bit double word registers, D0-D15
|
2013-07-24 01:52:06 +02:00
|
|
|
* - Thirty-two 32-bit single-word registers, S0-S31
|
|
|
|
* S<2n> maps to the least significant half of D<n>
|
|
|
|
* S<2n+1> maps to the most significant half of D<n>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef CONFIG_ARCH_FPU
|
|
|
|
# define REG_D0 (ARM_CONTEXT_REGS+0) /* D0 */
|
|
|
|
# define REG_S0 (ARM_CONTEXT_REGS+0) /* S0 */
|
|
|
|
# define REG_S1 (ARM_CONTEXT_REGS+1) /* S1 */
|
|
|
|
# define REG_D1 (ARM_CONTEXT_REGS+2) /* D1 */
|
|
|
|
# define REG_S2 (ARM_CONTEXT_REGS+2) /* S2 */
|
|
|
|
# define REG_S3 (ARM_CONTEXT_REGS+3) /* S3 */
|
|
|
|
# define REG_D2 (ARM_CONTEXT_REGS+4) /* D2 */
|
|
|
|
# define REG_S4 (ARM_CONTEXT_REGS+4) /* S4 */
|
|
|
|
# define REG_S5 (ARM_CONTEXT_REGS+5) /* S5 */
|
|
|
|
# define REG_D3 (ARM_CONTEXT_REGS+6) /* D3 */
|
|
|
|
# define REG_S6 (ARM_CONTEXT_REGS+6) /* S6 */
|
|
|
|
# define REG_S7 (ARM_CONTEXT_REGS+7) /* S7 */
|
|
|
|
# define REG_D4 (ARM_CONTEXT_REGS+8) /* D4 */
|
|
|
|
# define REG_S8 (ARM_CONTEXT_REGS+8) /* S8 */
|
|
|
|
# define REG_S9 (ARM_CONTEXT_REGS+9) /* S9 */
|
|
|
|
# define REG_D5 (ARM_CONTEXT_REGS+10) /* D5 */
|
|
|
|
# define REG_S10 (ARM_CONTEXT_REGS+10) /* S10 */
|
|
|
|
# define REG_S11 (ARM_CONTEXT_REGS+11) /* S11 */
|
|
|
|
# define REG_D6 (ARM_CONTEXT_REGS+12) /* D6 */
|
|
|
|
# define REG_S12 (ARM_CONTEXT_REGS+12) /* S12 */
|
|
|
|
# define REG_S13 (ARM_CONTEXT_REGS+13) /* S13 */
|
|
|
|
# define REG_D7 (ARM_CONTEXT_REGS+14) /* D7 */
|
|
|
|
# define REG_S14 (ARM_CONTEXT_REGS+14) /* S14 */
|
|
|
|
# define REG_S15 (ARM_CONTEXT_REGS+15) /* S15 */
|
|
|
|
# define REG_D8 (ARM_CONTEXT_REGS+16) /* D8 */
|
|
|
|
# define REG_S16 (ARM_CONTEXT_REGS+16) /* S16 */
|
|
|
|
# define REG_S17 (ARM_CONTEXT_REGS+17) /* S17 */
|
|
|
|
# define REG_D9 (ARM_CONTEXT_REGS+18) /* D9 */
|
|
|
|
# define REG_S18 (ARM_CONTEXT_REGS+18) /* S18 */
|
|
|
|
# define REG_S19 (ARM_CONTEXT_REGS+19) /* S19 */
|
|
|
|
# define REG_D10 (ARM_CONTEXT_REGS+20) /* D10 */
|
|
|
|
# define REG_S20 (ARM_CONTEXT_REGS+20) /* S20 */
|
|
|
|
# define REG_S21 (ARM_CONTEXT_REGS+21) /* S21 */
|
|
|
|
# define REG_D11 (ARM_CONTEXT_REGS+22) /* D11 */
|
|
|
|
# define REG_S22 (ARM_CONTEXT_REGS+22) /* S22 */
|
|
|
|
# define REG_S23 (ARM_CONTEXT_REGS+23) /* S23 */
|
|
|
|
# define REG_D12 (ARM_CONTEXT_REGS+24) /* D12 */
|
|
|
|
# define REG_S24 (ARM_CONTEXT_REGS+24) /* S24 */
|
|
|
|
# define REG_S25 (ARM_CONTEXT_REGS+25) /* S25 */
|
|
|
|
# define REG_D13 (ARM_CONTEXT_REGS+26) /* D13 */
|
|
|
|
# define REG_S26 (ARM_CONTEXT_REGS+26) /* S26 */
|
|
|
|
# define REG_S27 (ARM_CONTEXT_REGS+27) /* S27 */
|
|
|
|
# define REG_D14 (ARM_CONTEXT_REGS+28) /* D14 */
|
|
|
|
# define REG_S28 (ARM_CONTEXT_REGS+28) /* S28 */
|
|
|
|
# define REG_S29 (ARM_CONTEXT_REGS+29) /* S29 */
|
|
|
|
# define REG_D15 (ARM_CONTEXT_REGS+30) /* D15 */
|
|
|
|
# define REG_S30 (ARM_CONTEXT_REGS+30) /* S30 */
|
|
|
|
# define REG_S31 (ARM_CONTEXT_REGS+31) /* S31 */
|
|
|
|
# define REG_FPSCR (ARM_CONTEXT_REGS+32) /* Floating point status and control */
|
|
|
|
# define FPU_CONTEXT_REGS (33)
|
|
|
|
#else
|
|
|
|
# define FPU_CONTEXT_REGS (0)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* The total number of registers saved by software */
|
|
|
|
|
|
|
|
#define XCPTCONTEXT_REGS (ARM_CONTEXT_REGS + FPU_CONTEXT_REGS)
|
2013-07-18 23:20:47 +02:00
|
|
|
#define XCPTCONTEXT_SIZE (4 * XCPTCONTEXT_REGS)
|
|
|
|
|
2013-07-24 01:52:06 +02:00
|
|
|
/* Friendly register names */
|
|
|
|
|
2013-07-18 23:20:47 +02:00
|
|
|
#define REG_A1 REG_R0
|
|
|
|
#define REG_A2 REG_R1
|
|
|
|
#define REG_A3 REG_R2
|
|
|
|
#define REG_A4 REG_R3
|
|
|
|
#define REG_V1 REG_R4
|
|
|
|
#define REG_V2 REG_R5
|
|
|
|
#define REG_V3 REG_R6
|
|
|
|
#define REG_V4 REG_R7
|
|
|
|
#define REG_V5 REG_R8
|
|
|
|
#define REG_V6 REG_R9
|
|
|
|
#define REG_V7 REG_R10
|
|
|
|
#define REG_SB REG_R9
|
|
|
|
#define REG_SL REG_R10
|
|
|
|
#define REG_FP REG_R11
|
|
|
|
#define REG_IP REG_R12
|
|
|
|
#define REG_SP REG_R13
|
|
|
|
#define REG_LR REG_R14
|
|
|
|
#define REG_PC REG_R15
|
|
|
|
|
|
|
|
/* The PIC register is usually R10. It can be R9 is stack checking is enabled
|
|
|
|
* or if the user changes it with -mpic-register on the GCC command line.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define REG_PIC REG_R10
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Public Types
|
|
|
|
****************************************************************************/
|
|
|
|
|
2014-08-28 22:52:14 +02:00
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
|
|
|
|
/* This structure represents the return state from a system call */
|
|
|
|
|
|
|
|
#ifdef CONFIG_LIB_SYSCALL
|
|
|
|
struct xcpt_syscall_s
|
|
|
|
{
|
2014-08-29 22:47:22 +02:00
|
|
|
#ifdef CONFIG_BUILD_KERNEL
|
2014-08-28 22:52:14 +02:00
|
|
|
uint32_t cpsr; /* The CPSR value */
|
|
|
|
#endif
|
|
|
|
uint32_t sysreturn; /* The return PC */
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
2014-06-21 17:55:09 +02:00
|
|
|
/* This struct defines the way the registers are stored. We need to save:
|
2013-07-18 23:20:47 +02:00
|
|
|
*
|
|
|
|
* 1 CPSR
|
|
|
|
* 7 Static registers, v1-v7 (aka r4-r10)
|
|
|
|
* 1 Frame pointer, fp (aka r11)
|
|
|
|
* 1 Stack pointer, sp (aka r13)
|
|
|
|
* 1 Return address, lr (aka r14)
|
|
|
|
* ---
|
|
|
|
* 11 (XCPTCONTEXT_USER_REG)
|
|
|
|
*
|
|
|
|
* On interrupts, we also need to save:
|
|
|
|
* 4 Volatile registers, a1-a4 (aka r0-r3)
|
|
|
|
* 1 Scratch Register, ip (aka r12)
|
|
|
|
*---
|
|
|
|
* 5 (XCPTCONTEXT_IRQ_REGS)
|
|
|
|
*
|
|
|
|
* For a total of 17 (XCPTCONTEXT_REGS)
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
struct xcptcontext
|
|
|
|
{
|
2014-06-21 17:55:09 +02:00
|
|
|
/* The following function pointer is non-zero if there are pending signals
|
|
|
|
* to be processed.
|
2013-07-18 23:20:47 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CONFIG_DISABLE_SIGNALS
|
|
|
|
void *sigdeliver; /* Actual type is sig_deliver_t */
|
|
|
|
|
2014-06-21 17:55:09 +02:00
|
|
|
/* These are saved copies of LR and CPSR used during signal processing. */
|
2013-07-18 23:20:47 +02:00
|
|
|
|
|
|
|
uint32_t saved_pc;
|
|
|
|
uint32_t saved_cpsr;
|
2014-09-02 23:58:14 +02:00
|
|
|
|
|
|
|
# ifdef CONFIG_BUILD_KERNEL
|
|
|
|
/* This is the saved address to use when returning from a user-space
|
|
|
|
* signal handler.
|
|
|
|
*/
|
|
|
|
|
|
|
|
uint32_t sigreturn;
|
|
|
|
|
|
|
|
# endif
|
2013-07-18 23:20:47 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Register save area */
|
|
|
|
|
|
|
|
uint32_t regs[XCPTCONTEXT_REGS];
|
|
|
|
|
|
|
|
/* Extra fault address register saved for common paging logic. In the
|
2014-06-21 17:55:09 +02:00
|
|
|
* case of the pre-fetch abort, this value is the same as regs[REG_R15];
|
2013-07-18 23:20:47 +02:00
|
|
|
* For the case of the data abort, this value is the value of the fault
|
|
|
|
* address register (FAR) at the time of data abort exception.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef CONFIG_PAGING
|
|
|
|
uintptr_t far;
|
|
|
|
#endif
|
2014-08-24 17:57:53 +02:00
|
|
|
|
2014-08-28 22:52:14 +02:00
|
|
|
#ifdef CONFIG_LIB_SYSCALL
|
|
|
|
/* The following array holds the return address and the exc_return value
|
|
|
|
* needed to return from each nested system call.
|
|
|
|
*/
|
|
|
|
|
|
|
|
uint8_t nsyscalls;
|
|
|
|
struct xcpt_syscall_s syscall[CONFIG_SYS_NNEST];
|
|
|
|
#endif
|
|
|
|
|
2014-09-14 17:10:09 +02:00
|
|
|
#ifdef CONFIG_ARCH_ADDRENV
|
|
|
|
#ifdef CONFIG_ARCH_STACK_DYNAMIC
|
2014-09-14 19:19:34 +02:00
|
|
|
/* This array holds the physical address of the level 2 page table used
|
2014-08-24 17:57:53 +02:00
|
|
|
* to map the thread's stack memory. This array will be initially of
|
|
|
|
* zeroed and would be back-up up with pages during page fault exception
|
|
|
|
* handling to support dynamically sized stacks for each thread.
|
|
|
|
*/
|
|
|
|
|
2014-09-14 17:10:09 +02:00
|
|
|
FAR uintptr_t *ustack[ARCH_STACK_NSECTS];
|
|
|
|
#endif
|
2014-09-14 19:19:34 +02:00
|
|
|
|
2014-09-14 17:10:09 +02:00
|
|
|
#ifdef CONFIG_ARCH_KERNEL_STACK
|
|
|
|
/* In this configuration, all syscalls execute from an internal kernel
|
|
|
|
* stack. Why? Because when we instantiate and initialize the address
|
|
|
|
* environment of the new user process, we will temporarily lose the
|
|
|
|
* address environment of the old user process, including its stack
|
|
|
|
* contents. The kernel C logic will crash immediately with no valid
|
|
|
|
* stack in place.
|
|
|
|
*/
|
|
|
|
|
2014-09-14 19:19:34 +02:00
|
|
|
FAR uint32_t *ustkptr; /* Saved user stack pointer */
|
|
|
|
FAR uint32_t *kstack; /* Allocate base of the (aligned) kernel stack */
|
2014-09-15 19:38:48 +02:00
|
|
|
#ifndef CONFIG_DISABLE_SIGNALS
|
|
|
|
FAR uint32_t *kstkptr; /* Saved kernel stack pointer */
|
|
|
|
#endif
|
2014-09-14 17:10:09 +02:00
|
|
|
#endif
|
2014-08-24 17:57:53 +02:00
|
|
|
#endif
|
2013-07-18 23:20:47 +02:00
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
2014-08-28 22:52:14 +02:00
|
|
|
#endif /* __ASSEMBLY__ */
|
|
|
|
|
2013-07-18 23:20:47 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Inline functions
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
|
2013-07-31 17:11:24 +02:00
|
|
|
/* Return the current IRQ state */
|
2013-07-18 23:20:47 +02:00
|
|
|
|
2013-07-31 17:11:24 +02:00
|
|
|
static inline irqstate_t irqstate(void)
|
2013-07-18 23:20:47 +02:00
|
|
|
{
|
2013-07-22 01:08:40 +02:00
|
|
|
unsigned int cpsr;
|
|
|
|
|
2013-07-18 23:20:47 +02:00
|
|
|
__asm__ __volatile__
|
|
|
|
(
|
2013-07-22 01:08:40 +02:00
|
|
|
"\tmrs %0, cpsr\n"
|
|
|
|
: "=r" (cpsr)
|
|
|
|
:
|
|
|
|
: "memory"
|
|
|
|
);
|
|
|
|
|
|
|
|
return cpsr;
|
|
|
|
}
|
|
|
|
|
2013-07-31 17:11:24 +02:00
|
|
|
/* Disable IRQs and return the previous IRQ state */
|
2013-07-22 01:08:40 +02:00
|
|
|
|
2013-07-31 17:11:24 +02:00
|
|
|
static inline irqstate_t irqsave(void)
|
2013-07-22 01:08:40 +02:00
|
|
|
{
|
|
|
|
unsigned int cpsr;
|
|
|
|
|
|
|
|
__asm__ __volatile__
|
|
|
|
(
|
|
|
|
"\tmrs %0, cpsr\n"
|
2013-07-31 17:11:24 +02:00
|
|
|
"\tcpsid i\n"
|
2014-06-21 02:16:41 +02:00
|
|
|
#if defined(CONFIG_ARMV7A_DECODEFIQ)
|
|
|
|
"\tcpsid f\n"
|
|
|
|
#endif
|
2013-07-22 01:08:40 +02:00
|
|
|
: "=r" (cpsr)
|
|
|
|
:
|
|
|
|
: "memory"
|
|
|
|
);
|
|
|
|
|
|
|
|
return cpsr;
|
2013-07-18 23:20:47 +02:00
|
|
|
}
|
|
|
|
|
2013-07-31 17:11:24 +02:00
|
|
|
/* Enable IRQs and return the previous IRQ state */
|
2013-07-30 19:37:09 +02:00
|
|
|
|
2013-07-31 17:11:24 +02:00
|
|
|
static inline irqstate_t irqenable(void)
|
2013-07-30 19:37:09 +02:00
|
|
|
{
|
|
|
|
unsigned int cpsr;
|
|
|
|
|
|
|
|
__asm__ __volatile__
|
|
|
|
(
|
|
|
|
"\tmrs %0, cpsr\n"
|
2013-07-31 17:11:24 +02:00
|
|
|
"\tcpsie i\n"
|
2014-06-21 02:16:41 +02:00
|
|
|
#if defined(CONFIG_ARMV7A_DECODEFIQ)
|
|
|
|
"\tcpsie f\n"
|
|
|
|
#endif
|
2013-07-30 19:37:09 +02:00
|
|
|
: "=r" (cpsr)
|
|
|
|
:
|
|
|
|
: "memory"
|
|
|
|
);
|
|
|
|
|
|
|
|
return cpsr;
|
|
|
|
}
|
|
|
|
|
2013-07-18 23:20:47 +02:00
|
|
|
/* Restore saved IRQ & FIQ state */
|
|
|
|
|
|
|
|
static inline void irqrestore(irqstate_t flags)
|
|
|
|
{
|
|
|
|
__asm__ __volatile__
|
|
|
|
(
|
2013-07-22 01:08:40 +02:00
|
|
|
"msr cpsr_c, %0"
|
|
|
|
:
|
|
|
|
: "r" (flags)
|
|
|
|
: "memory"
|
|
|
|
);
|
2013-07-18 23:20:47 +02:00
|
|
|
}
|
2013-07-22 01:08:40 +02:00
|
|
|
|
2013-07-18 23:20:47 +02:00
|
|
|
#endif /* __ASSEMBLY__ */
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Public Variables
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
#ifdef __cplusplus
|
|
|
|
#define EXTERN extern "C"
|
2014-06-21 17:55:09 +02:00
|
|
|
extern "C"
|
|
|
|
{
|
2013-07-18 23:20:47 +02:00
|
|
|
#else
|
|
|
|
#define EXTERN extern
|
|
|
|
#endif
|
|
|
|
|
2014-06-21 17:55:09 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Public Function Prototypes
|
|
|
|
****************************************************************************/
|
|
|
|
|
2013-07-18 23:20:47 +02:00
|
|
|
#undef EXTERN
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* __ARCH_ARM_INCLUDE_ARMV7_A_IRQ_H */
|