rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
kinetis_irq.c
Go to the documentation of this file.
1/*
2 ChibiOS - Copyright (C) 2014-2015 Fabio Utzig
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/**
18 * @file kinetis_irq.c
19 * @brief IRQ handler with mappings to Kinetis FSL level drivers.
20 * @author andreika <prometheus.pcb@gmail.com>
21 *
22 */
23
24#include "osal.h"
25#include "hal.h"
26
27#define DECLARE_DMA_HANDLER(n) extern void DMA##n##_DriverIRQHandler(void); \
28 OSAL_IRQ_HANDLER(KINETIS_DMA##n##_IRQ_VECTOR) { \
29 OSAL_IRQ_PROLOGUE(); \
30 DMA##n##_DriverIRQHandler(); \
31 OSAL_IRQ_EPILOGUE(); \
32 }
33
50
51#ifdef KINETIS_HAS_DMA_ERROR_IRQ
53OSAL_IRQ_HANDLER(KINETIS_DMA_ERROR_IRQ_VECTOR) {
54 OSAL_IRQ_PROLOGUE();
56 OSAL_IRQ_EPILOGUE();
57}
58#endif
59
60#define DECLARE_UART_HANDLER(n,RT) extern void LPUART##n##_##RT##_DriverIRQHandler(void); \
61 OSAL_IRQ_HANDLER(KINETIS_UART##n##_##RT##_IRQ_VECTOR) { \
62 OSAL_IRQ_PROLOGUE(); \
63 LPUART##n##_##RT##_DriverIRQHandler(); \
64 OSAL_IRQ_EPILOGUE(); \
65 }
66
67
68#ifdef KINETIS_HAS_UART0
71#endif
72
73#ifdef KINETIS_HAS_UART1
76#endif
77
78#ifdef KINETIS_HAS_UART2
81#endif
82
83#define DECLARE_SPI_HANDLER(n) extern void LPSPI##n##_DriverIRQHandler(void); \
84 OSAL_IRQ_HANDLER(KINETIS_SPI##n##_IRQ_VECTOR) { \
85 OSAL_IRQ_PROLOGUE(); \
86 LPSPI##n##_DriverIRQHandler(); \
87 OSAL_IRQ_EPILOGUE(); \
88 }
89
90#ifdef KINETIS_HAS_SPI0
92#endif
93
94#ifdef KINETIS_HAS_SPI1
96#endif
97
98#define DECLARE_GPIO_HANDLER(n) extern void _pal_lld_irq_handler(PORT_Type *base); \
99 OSAL_IRQ_HANDLER(KINETIS_PORT##n##_IRQ_VECTOR) { \
100 OSAL_IRQ_PROLOGUE(); \
101 _pal_lld_irq_handler(PORT##n); \
102 OSAL_IRQ_EPILOGUE(); \
103 }
104
105#ifdef KINETIS_HAS_GPIOA
107#endif
108
109#ifdef KINETIS_HAS_GPIOB
111#endif
112
113#ifdef KINETIS_HAS_GPIOC
115#endif
116
117#ifdef KINETIS_HAS_GPIOD
119#endif
120
121#ifdef KINETIS_HAS_GPIOE
123#endif
C
OSAL_IRQ_HANDLER(KINETIS_DMA_ERROR_IRQ_VECTOR)
Definition kinetis_irq.c:53
void DMA_Error_DriverIRQHandler(void)
DECLARE_SPI_HANDLER(0)
DECLARE_UART_HANDLER(0, RX)
DECLARE_GPIO_HANDLER(A)
DECLARE_DMA_HANDLER(0)