1 |
786 |
skrzyp |
#ifndef CYGONCE_HAL_VAR_INTR_H
|
2 |
|
|
#define CYGONCE_HAL_VAR_INTR_H
|
3 |
|
|
//==========================================================================
|
4 |
|
|
//
|
5 |
|
|
// var_intr.h
|
6 |
|
|
//
|
7 |
|
|
// HAL Interrupt and clock assignments for Kinetis variants
|
8 |
|
|
//
|
9 |
|
|
//==========================================================================
|
10 |
|
|
// ####ECOSGPLCOPYRIGHTBEGIN####
|
11 |
|
|
// -------------------------------------------
|
12 |
|
|
// This file is part of eCos, the Embedded Configurable Operating System.
|
13 |
|
|
// Copyright (C) 2011 Free Software Foundation, Inc.
|
14 |
|
|
//
|
15 |
|
|
// eCos is free software; you can redistribute it and/or modify it under
|
16 |
|
|
// the terms of the GNU General Public License as published by the Free
|
17 |
|
|
// Software Foundation; either version 2 or (at your option) any later
|
18 |
|
|
// version.
|
19 |
|
|
//
|
20 |
|
|
// eCos is distributed in the hope that it will be useful, but WITHOUT
|
21 |
|
|
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
22 |
|
|
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
23 |
|
|
// for more details.
|
24 |
|
|
//
|
25 |
|
|
// You should have received a copy of the GNU General Public License
|
26 |
|
|
// along with eCos; if not, write to the Free Software Foundation, Inc.,
|
27 |
|
|
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
28 |
|
|
//
|
29 |
|
|
// As a special exception, if other files instantiate templates or use
|
30 |
|
|
// macros or inline functions from this file, or you compile this file
|
31 |
|
|
// and link it with other works to produce a work based on this file,
|
32 |
|
|
// this file does not by itself cause the resulting work to be covered by
|
33 |
|
|
// the GNU General Public License. However the source code for this file
|
34 |
|
|
// must still be made available in accordance with section (3) of the GNU
|
35 |
|
|
// General Public License v2.
|
36 |
|
|
//
|
37 |
|
|
// This exception does not invalidate any other reasons why a work based
|
38 |
|
|
// on this file might be covered by the GNU General Public License.
|
39 |
|
|
// -------------------------------------------
|
40 |
|
|
// ####ECOSGPLCOPYRIGHTEND####
|
41 |
|
|
//==========================================================================
|
42 |
|
|
//#####DESCRIPTIONBEGIN####
|
43 |
|
|
//
|
44 |
|
|
// Author(s): ilijak
|
45 |
|
|
// Date: 2011-02-05
|
46 |
|
|
// Purpose: Define Interrupt support
|
47 |
|
|
// Description: The interrupt specifics for Freescale Kinetis variants are
|
48 |
|
|
// defined here.
|
49 |
|
|
//
|
50 |
|
|
// Usage: #include <cyg/hal/var_intr.h>
|
51 |
|
|
// However applications should include using <cyg/hal/hal_intr.h>
|
52 |
|
|
// instead to allow for platform overrides.
|
53 |
|
|
//
|
54 |
|
|
//####DESCRIPTIONEND####
|
55 |
|
|
//
|
56 |
|
|
//==========================================================================
|
57 |
|
|
|
58 |
|
|
#include <cyg/hal/plf_intr.h>
|
59 |
|
|
|
60 |
|
|
//==========================================================================
|
61 |
|
|
|
62 |
|
|
typedef enum {
|
63 |
|
|
CYGNUM_HAL_INTERRUPT_DMA0
|
64 |
|
|
= CYGNUM_HAL_INTERRUPT_EXTERNAL, // DMA Channel 0 Transfer Complete
|
65 |
|
|
CYGNUM_HAL_INTERRUPT_DMA1, // DMA Channel 1 Transfer Complete
|
66 |
|
|
CYGNUM_HAL_INTERRUPT_DMA2, // DMA Channel 2 Transfer Complete
|
67 |
|
|
CYGNUM_HAL_INTERRUPT_DMA3, // DMA Channel 3 Transfer Complete
|
68 |
|
|
CYGNUM_HAL_INTERRUPT_DMA4, // DMA Channel 4 Transfer Complete
|
69 |
|
|
CYGNUM_HAL_INTERRUPT_DMA5, // DMA Channel 5 Transfer Complete
|
70 |
|
|
CYGNUM_HAL_INTERRUPT_DMA6, // DMA Channel 6 Transfer Complete
|
71 |
|
|
CYGNUM_HAL_INTERRUPT_DMA7, // DMA Channel 7 Transfer Complete
|
72 |
|
|
CYGNUM_HAL_INTERRUPT_DMA8, // DMA Channel 8 Transfer Complete
|
73 |
|
|
CYGNUM_HAL_INTERRUPT_DMA9, // DMA Channel 9 Transfer Complete
|
74 |
|
|
CYGNUM_HAL_INTERRUPT_DMA10, // DMA Channel 10 Transfer Complete
|
75 |
|
|
CYGNUM_HAL_INTERRUPT_DMA11, // DMA Channel 11 Transfer Complete
|
76 |
|
|
CYGNUM_HAL_INTERRUPT_DMA12, // DMA Channel 12 Transfer Complete
|
77 |
|
|
CYGNUM_HAL_INTERRUPT_DMA13, // DMA Channel 13 Transfer Complete
|
78 |
|
|
CYGNUM_HAL_INTERRUPT_DMA14, // DMA Channel 14 Transfer Complete
|
79 |
|
|
CYGNUM_HAL_INTERRUPT_DMA15, // DMA Channel 15 Transfer Complete
|
80 |
|
|
CYGNUM_HAL_INTERRUPT_DMA_ERROR, // DMA Error Int
|
81 |
|
|
CYGNUM_HAL_INTERRUPT_MCM, // Normal Int
|
82 |
|
|
CYGNUM_HAL_INTERRUPT_FTFL, // FTFL Int
|
83 |
|
|
CYGNUM_HAL_INTERRUPT_READ_COLLISION, // Read Collision Int
|
84 |
|
|
CYGNUM_HAL_INTERRUPT_LVD_LVW, // Low Volt Detect, Low Volt Warn
|
85 |
|
|
CYGNUM_HAL_INTERRUPT_LLW, // Low Leakage Wakeup
|
86 |
|
|
CYGNUM_HAL_INTERRUPT_WDOG, // WDOG Int
|
87 |
|
|
CYGNUM_HAL_INTERRUPT_RNGB, // RNGB Int
|
88 |
|
|
CYGNUM_HAL_INTERRUPT_I2C0, // I2C0 int
|
89 |
|
|
CYGNUM_HAL_INTERRUPT_I2C1, // I2C1 int
|
90 |
|
|
CYGNUM_HAL_INTERRUPT_SPI0, // SPI0 Int
|
91 |
|
|
CYGNUM_HAL_INTERRUPT_SPI1, // SPI1 Int
|
92 |
|
|
CYGNUM_HAL_INTERRUPT_SPI2, // SPI2 Int
|
93 |
|
|
CYGNUM_HAL_INTERRUPT_CAN0_ORED_MESSAGE_BUFFER,// CAN0 OR'd Msg Buffs Int
|
94 |
|
|
CYGNUM_HAL_INTERRUPT_CAN0_BUS_OFF, // CAN0 Bus Off Int
|
95 |
|
|
CYGNUM_HAL_INTERRUPT_CAN0_ERROR, // CAN0 Error Int
|
96 |
|
|
CYGNUM_HAL_INTERRUPT_CAN0_TX_WARNING, // CAN0 Tx Warning Int
|
97 |
|
|
CYGNUM_HAL_INTERRUPT_CAN0_RX_WARNING, // CAN0 Rx Warning Int
|
98 |
|
|
CYGNUM_HAL_INTERRUPT_CAN0_WAKE_UP, // CAN0 Wake Up Int
|
99 |
|
|
CYGNUM_HAL_INTERRUPT_CAN0_IMEU, // CAN0 Ind. Match El Update (IMEU) Int
|
100 |
|
|
CYGNUM_HAL_INTERRUPT_CAN0_LOST_RX, // CAN0 Lost Receive Int
|
101 |
|
|
CYGNUM_HAL_INTERRUPT_CAN1_ORED_MESSAGE_BUFFER, // CAN1 OR'd Msg Buffs Int
|
102 |
|
|
CYGNUM_HAL_INTERRUPT_CAN1_BUS_OFF, // CAN1 Bus Off Int
|
103 |
|
|
CYGNUM_HAL_INTERRUPT_CAN1_ERROR, // CAN1 Error Int
|
104 |
|
|
CYGNUM_HAL_INTERRUPT_CAN1_TX_WARNING, // CAN1 Tx Warning Int
|
105 |
|
|
CYGNUM_HAL_INTERRUPT_CAN1_RX_WARNING, // CAN1 Rx Warning Int
|
106 |
|
|
CYGNUM_HAL_INTERRUPT_CAN1_WAKE_UP, // CAN1 Wake Up Int
|
107 |
|
|
CYGNUM_HAL_INTERRUPT_CAN1_IMEU, // CAN1 Ind. Match El Update (IMEU) Int
|
108 |
|
|
CYGNUM_HAL_INTERRUPT_CAN1_LOST_RX, // CAN1 Lost Receive Int
|
109 |
|
|
CYGNUM_HAL_INTERRUPT_UART0_RX_TX, // UART0 Receive/Transmit int
|
110 |
|
|
CYGNUM_HAL_INTERRUPT_UART0_ERR, // UART0 Error int
|
111 |
|
|
CYGNUM_HAL_INTERRUPT_UART1_RX_TX, // UART1 Receive/Transmit int
|
112 |
|
|
CYGNUM_HAL_INTERRUPT_UART1_ERR, // UART1 Error int
|
113 |
|
|
CYGNUM_HAL_INTERRUPT_UART2_RX_TX, // UART2 Receive/Transmit int
|
114 |
|
|
CYGNUM_HAL_INTERRUPT_UART2_ERR, // UART2 Error int
|
115 |
|
|
CYGNUM_HAL_INTERRUPT_UART3_RX_TX, // UART3 Receive/Transmit int
|
116 |
|
|
CYGNUM_HAL_INTERRUPT_UART3_ERR, // UART3 Error int
|
117 |
|
|
CYGNUM_HAL_INTERRUPT_UART4_RX_TX, // UART4 Receive/Transmit int
|
118 |
|
|
CYGNUM_HAL_INTERRUPT_UART4_ERR, // UART4 Error int
|
119 |
|
|
CYGNUM_HAL_INTERRUPT_UART5_RX_TX, // UART5 Receive/Transmit int
|
120 |
|
|
CYGNUM_HAL_INTERRUPT_UART5_ERR, // UART5 Error int
|
121 |
|
|
CYGNUM_HAL_INTERRUPT_ADC0, // ADC0 int
|
122 |
|
|
CYGNUM_HAL_INTERRUPT_ADC1, // ADC1 int
|
123 |
|
|
CYGNUM_HAL_INTERRUPT_CMP0, // CMP0 int
|
124 |
|
|
CYGNUM_HAL_INTERRUPT_CMP1, // CMP1 int
|
125 |
|
|
CYGNUM_HAL_INTERRUPT_CMP2, // CMP2 int
|
126 |
|
|
CYGNUM_HAL_INTERRUPT_FTM0, // FTM0 fault, overflow and channels int
|
127 |
|
|
CYGNUM_HAL_INTERRUPT_FTM1, // FTM1 fault, overflow and channels int
|
128 |
|
|
CYGNUM_HAL_INTERRUPT_FTM2, // FTM2 fault, overflow and channels int
|
129 |
|
|
CYGNUM_HAL_INTERRUPT_CMT, // CMT int
|
130 |
|
|
CYGNUM_HAL_INTERRUPT_RTC, // RTC int
|
131 |
|
|
CYGNUM_HAL_INTERRUPT_Reserved83, // Reserved int 83
|
132 |
|
|
CYGNUM_HAL_INTERRUPT_PIT0, // PIT timer channel 0 int
|
133 |
|
|
CYGNUM_HAL_INTERRUPT_PIT1, // PIT timer channel 1 int
|
134 |
|
|
CYGNUM_HAL_INTERRUPT_PIT2, // PIT timer channel 2 int
|
135 |
|
|
CYGNUM_HAL_INTERRUPT_PIT3, // PIT timer channel 3 int
|
136 |
|
|
CYGNUM_HAL_INTERRUPT_PDB0, // PDB0 Int
|
137 |
|
|
CYGNUM_HAL_INTERRUPT_USB0, // USB0 int
|
138 |
|
|
CYGNUM_HAL_INTERRUPT_USBDCD, // USBDCD Int
|
139 |
|
|
CYGNUM_HAL_INTERRUPT_ENET_1588_TIMER, // ENET MAC IEEE 1588 Timer Int
|
140 |
|
|
CYGNUM_HAL_INTERRUPT_ENET_TRANSMIT, // ENET MAC Transmit Int
|
141 |
|
|
CYGNUM_HAL_INTERRUPT_ENET_RECEIVE, // ENET MAC Receive Int
|
142 |
|
|
CYGNUM_HAL_INTERRUPT_ENET_ERROR, // ENET MAC Error and miscelaneous Int
|
143 |
|
|
CYGNUM_HAL_INTERRUPT_I2S0, // I2S0 Int
|
144 |
|
|
CYGNUM_HAL_INTERRUPT_SDHC, // SDHC Int
|
145 |
|
|
CYGNUM_HAL_INTERRUPT_DAC0, // DAC0 int
|
146 |
|
|
CYGNUM_HAL_INTERRUPT_DAC1, // DAC1 int
|
147 |
|
|
CYGNUM_HAL_INTERRUPT_TSI0, // TSI0 Int
|
148 |
|
|
CYGNUM_HAL_INTERRUPT_MCG, // MCG Int
|
149 |
|
|
CYGNUM_HAL_INTERRUPT_LPTIMER, // LPTimer int
|
150 |
|
|
CYGNUM_HAL_INTERRUPT_LCD, // Segment LCD int
|
151 |
|
|
CYGNUM_HAL_INTERRUPT_PORTA, // Port A int
|
152 |
|
|
CYGNUM_HAL_INTERRUPT_PORTB, // Port B int
|
153 |
|
|
CYGNUM_HAL_INTERRUPT_PORTC, // Port C int
|
154 |
|
|
CYGNUM_HAL_INTERRUPT_PORTD, // Port D int
|
155 |
|
|
CYGNUM_HAL_INTERRUPT_PORTE, // Port E int
|
156 |
|
|
CYGNUM_HAL_INTERRUPT_Reserved108, // Reserved int 108
|
157 |
|
|
CYGNUM_HAL_INTERRUPT_Reserved109, // Reserved int 109
|
158 |
|
|
CYGNUM_HAL_INTERRUPT_Reserved110, // Reserved int 110
|
159 |
|
|
CYGNUM_HAL_INTERRUPT_Reserved111, // Reserved int 111
|
160 |
|
|
CYGNUM_HAL_INTERRUPT_Reserved112, // Reserved int 112
|
161 |
|
|
CYGNUM_HAL_INTERRUPT_Reserved113, // Reserved int 113
|
162 |
|
|
CYGNUM_HAL_INTERRUPT_Reserved114, // Reserved int 114
|
163 |
|
|
CYGNUM_HAL_INTERRUPT_Reserved115, // Reserved int 115
|
164 |
|
|
CYGNUM_HAL_INTERRUPT_Reserved116, // Reserved int 116
|
165 |
|
|
CYGNUM_HAL_INTERRUPT_Reserved117, // Reserved int 117
|
166 |
|
|
CYGNUM_HAL_INTERRUPT_Reserved118, // Reserved int 118
|
167 |
|
|
CYGNUM_HAL_INTERRUPT_Reserved119 // Reserved int 119
|
168 |
|
|
} KinetisExtInterrupt_e;
|
169 |
|
|
|
170 |
|
|
#define CYGNUM_HAL_INTERRUPT_NVIC_MAX (CYGNUM_HAL_INTERRUPT_Reserved119)
|
171 |
|
|
|
172 |
|
|
#define CYGNUM_HAL_ISR_MIN 0
|
173 |
|
|
#define CYGNUM_HAL_ISR_MAX CYGNUM_HAL_INTERRUPT_Reserved119
|
174 |
|
|
#define CYGNUM_HAL_ISR_COUNT (CYGNUM_HAL_ISR_MAX + 1)
|
175 |
|
|
|
176 |
|
|
#define CYGNUM_HAL_VSR_MIN 0
|
177 |
|
|
#ifndef CYGNUM_HAL_VSR_MAX
|
178 |
|
|
# define CYGNUM_HAL_VSR_MAX (CYGNUM_HAL_VECTOR_SYS_TICK+ \
|
179 |
|
|
CYGNUM_HAL_INTERRUPT_NVIC_MAX)
|
180 |
|
|
#endif
|
181 |
|
|
|
182 |
|
|
#define CYGNUM_HAL_VSR_COUNT (CYGNUM_HAL_VSR_MAX+1)
|
183 |
|
|
|
184 |
|
|
//==========================================================================
|
185 |
|
|
// Interrupt mask and config for variant-specific devices
|
186 |
|
|
|
187 |
|
|
// PORT Pin interrupts
|
188 |
|
|
|
189 |
|
|
#define CYGHWR_HAL_KINETIS_PIN_IRQ_VECTOR(__pin) \
|
190 |
|
|
(CYGNUM_HAL_INTERRUPT_PORTA + CYGHWR_HAL_KINETIS_PIN_PORT(__pin))
|
191 |
|
|
|
192 |
|
|
//===========================================================================
|
193 |
|
|
// Interrupt resources exported by HAL to device drivers
|
194 |
|
|
|
195 |
|
|
// Export Interrupt vectors to serial driver.
|
196 |
|
|
|
197 |
|
|
#define CYGNUM_IO_SERIAL_FREESCALE_UART0_INT_VECTOR \
|
198 |
|
|
CYGNUM_HAL_INTERRUPT_UART0_RX_TX
|
199 |
|
|
#define CYGNUM_IO_SERIAL_FREESCALE_UART1_INT_VECTOR \
|
200 |
|
|
CYGNUM_HAL_INTERRUPT_UART1_RX_TX
|
201 |
|
|
#define CYGNUM_IO_SERIAL_FREESCALE_UART2_INT_VECTOR \
|
202 |
|
|
CYGNUM_HAL_INTERRUPT_UART2_RX_TX
|
203 |
|
|
#define CYGNUM_IO_SERIAL_FREESCALE_UART3_INT_VECTOR \
|
204 |
|
|
CYGNUM_HAL_INTERRUPT_UART3_RX_TX
|
205 |
|
|
#define CYGNUM_IO_SERIAL_FREESCALE_UART4_INT_VECTOR \
|
206 |
|
|
CYGNUM_HAL_INTERRUPT_UART4_RX_TX
|
207 |
|
|
#define CYGNUM_IO_SERIAL_FREESCALE_UART5_INT_VECTOR \
|
208 |
|
|
CYGNUM_HAL_INTERRUPT_UART5_RX_TX
|
209 |
|
|
|
210 |
|
|
// Export Interrupt vectors to ENET driver.
|
211 |
|
|
|
212 |
|
|
#define CYGNUM_FREESCALE_ENET0_1588_TIMER_INT_VECTOR \
|
213 |
|
|
CYGNUM_HAL_INTERRUPT_ENET_1588_TIMER
|
214 |
|
|
#define CYGNUM_FREESCALE_ENET0_TRANSMIT_INT_VECTOR \
|
215 |
|
|
CYGNUM_HAL_INTERRUPT_ENET_TRANSMIT
|
216 |
|
|
#define CYGNUM_FREESCALE_ENET0_RECEIVE_INT_VECTOR \
|
217 |
|
|
CYGNUM_HAL_INTERRUPT_ENET_RECEIVE
|
218 |
|
|
#define CYGNUM_FREESCALE_ENET0_ERROR_INT_VECTOR \
|
219 |
|
|
CYGNUM_HAL_INTERRUPT_ENET_ERROR
|
220 |
|
|
|
221 |
|
|
//----------------------------------------------------------------------------
|
222 |
|
|
#endif // CYGONCE_HAL_VAR_INTR_H
|
223 |
|
|
// EOF var_intr.h
|