1 /* -------------------------------- Arctic Core ------------------------------
\r
2 * Arctic Core - the open source AUTOSAR platform http://arccore.com
\r
4 * Copyright (C) 2009 ArcCore AB <contact@arccore.com>
\r
6 * This source code is free software; you can redistribute it and/or modify it
\r
7 * under the terms of the GNU General Public License version 2 as published by the
\r
8 * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.
\r
10 * This program is distributed in the hope that it will be useful, but
\r
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
\r
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
\r
14 * -------------------------------- Arctic Core ------------------------------*/
\r
20 #define IrqGetCurrentInterruptSource() \
\r
21 (((volatile sint8)vimREG->IRQIVEC) - 1)
\r
23 /** IrqActivateChannel turns the selected channel on in the VIM */
\r
24 #define IrqActivateChannel(_channel) \
\r
25 if (_channel > 31) { \
\r
26 vimREG->REQMASKSET1 |= (1 << (_channel - 32)); \
\r
28 vimREG->REQMASKSET0 |= (1 << _channel); \
\r
32 /** IrqDeactivateChannel turns the selected channel off in the VIM */
\r
33 #define IrqDeactivateChannel(_channel) \
\r
34 if (_channel > 31) { \
\r
35 vimREG->REQMASKCLR1 = (1 << (_channel - 32)); \
\r
37 vimREG->REQMASKCLR0 = (1 << _channel); \
\r
42 IrqDeactivateChannel(isrPtr->vector)
\r
46 IrqActivateChannel(isrPtr->vector)
\r
113 NUMBER_OF_INTERRUPTS_AND_EXCEPTIONS,
\r
116 /* Total number of interrupts and exceptions
\r
118 #define NUMBER_OF_INTERRUPTS_AND_EXCEPTIONS 65
\r
121 PERIPHERAL_CLOCK_AHB,
\r
122 PERIPHERAL_CLOCK_APB1,
\r
123 PERIPHERAL_CLOCK_APB2,
\r
124 PERIPHERAL_CLOCK_CAN,
\r
125 PERIPHERAL_CLOCK_DCAN1,
\r
126 PERIPHERAL_CLOCK_DCAN2,
\r
127 PERIPHERAL_CLOCK_DCAN3
\r
128 } McuE_PeriperalClock_t;
\r
134 #endif /* IRQ_H_ */
\r