]> rtime.felk.cvut.cz Git - arc.git/blob - arch/arm/arm_cm3/kernel/irq_types.h
Again, loads of refactoring and removing and adding files.
[arc.git] / arch / arm / arm_cm3 / kernel / irq_types.h
1 /* -------------------------------- Arctic Core ------------------------------
2  * Arctic Core - the open source AUTOSAR platform http://arccore.com
3  *
4  * Copyright (C) 2009  ArcCore AB <contact@arccore.com>
5  *
6  * This source code is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License version 2 as published by the
8  * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
13  * for more details.
14  * -------------------------------- Arctic Core ------------------------------*/
15 \r
16 #ifndef IRQ_H_\r
17 #define IRQ_H_\r
18 \r
19 #include "stm32f10x.h"\r
20 \r
21 typedef IRQn_Type IrqType;
22
23 /* Offset from start of exceptions to interrupts
24  * Exceptions have negative offsets while interrupts have positive
25  */
26 #define IRQ_INTERRUPT_OFFSET  16\r
27
28 /* Total number of interrupts and exceptions
29  */
30
31 #if   defined(STM32F10X_LD) || defined(STM32F10X_MD)
32 #define NUMBER_OF_INTERRUPTS_AND_EXCEPTIONS (USBWakeUp_IRQn+IRQ_INTERRUPT_OFFSET)
33 #elif defined(STM32F10X_HD)
34 #define NUMBER_OF_INTERRUPTS_AND_EXCEPTIONS (DMA2_Channel4_5_IRQn+IRQ_INTERRUPT_OFFSET)
35 #elif defined(STM32F10X_CL)
36 #define NUMBER_OF_INTERRUPTS_AND_EXCEPTIONS (OTG_FS_IRQn+IRQ_INTERRUPT_OFFSET)
37 #else
38 #error No device selected
39 #endif
40 \r
41 typedef enum {\r
42         CPU_0=0,\r
43 } Cpu_t;\r
44 \r
45 #endif /* IRQ_H_ */\r