Mercurial > public > ostc4
comparison Discovery/Src/stm32f4xx_it.c @ 38:5f11787b4f42
include in ostc4 repository
| author | heinrichsweikamp |
|---|---|
| date | Sat, 28 Apr 2018 11:52:34 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 37:ccc45c0e1ea2 | 38:5f11787b4f42 |
|---|---|
| 1 /////////////////////////////////////////////////////////////////////////////// | |
| 2 /// -*- coding: UTF-8 -*- | |
| 3 /// | |
| 4 /// \file Discovery/Src/stm32f4xx_it.c | |
| 5 /// \brief This function handles System tick timer and all interupt vectors. | |
| 6 /// \author Heinrichs Weikamp gmbh | |
| 7 /// \date 18/03/2015 15:35:40 | |
| 8 /// | |
| 9 /// \details | |
| 10 /// | |
| 11 /// $Id$ | |
| 12 /////////////////////////////////////////////////////////////////////////////// | |
| 13 /// \par Copyright (c) 2014-2018 Heinrichs Weikamp gmbh | |
| 14 /// | |
| 15 /// This program is free software: you can redistribute it and/or modify | |
| 16 /// it under the terms of the GNU General Public License as published by | |
| 17 /// the Free Software Foundation, either version 3 of the License, or | |
| 18 /// (at your option) any later version. | |
| 19 /// | |
| 20 /// This program is distributed in the hope that it will be useful, | |
| 21 /// but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 22 /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 23 /// GNU General Public License for more details. | |
| 24 /// | |
| 25 /// You should have received a copy of the GNU General Public License | |
| 26 /// along with this program. If not, see <http://www.gnu.org/licenses/>. | |
| 27 /// | |
| 28 ////////////////////////////////////////////////////////////////////////////// | |
| 29 /// \par Copyright (c) COPYRIGHT(c) 2015 STMicroelectronics | |
| 30 /// | |
| 31 /// Redistribution and use in source and binary forms, with or without modification, | |
| 32 /// are permitted provided that the following conditions are met: | |
| 33 /// 1. Redistributions of source code must retain the above copyright notice, | |
| 34 /// this list of conditions and the following disclaimer. | |
| 35 /// 2. Redistributions in binary form must reproduce the above copyright notice, | |
| 36 /// this list of conditions and the following disclaimer in the documentation | |
| 37 /// and/or other materials provided with the distribution. | |
| 38 /// 3. Neither the name of STMicroelectronics nor the names of its contributors | |
| 39 /// may be used to endorse or promote products derived from this software | |
| 40 /// without specific prior written permission. | |
| 41 /// | |
| 42 /// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | |
| 43 /// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
| 44 /// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 45 /// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | |
| 46 /// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 47 /// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 48 /// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | |
| 49 /// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | |
| 50 /// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
| 51 /// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 52 ////////////////////////////////////////////////////////////////////////////// | |
| 53 | |
| 54 /* Includes ------------------------------------------------------------------*/ | |
| 55 #include "stm32f4xx_hal.h" | |
| 56 #include "stm32f4xx.h" | |
| 57 #include "stm32f4xx_it.h" | |
| 58 /* USER CODE BEGIN 0 */ | |
| 59 | |
| 60 #include "ostc.h" | |
| 61 | |
| 62 #ifdef DEMOMODE | |
| 63 # include "demo.h" | |
| 64 extern TIM_HandleTypeDef TimDemoHandle; | |
| 65 #endif | |
| 66 | |
| 67 extern DMA2D_HandleTypeDef Dma2dHandle; | |
| 68 extern TIM_HandleTypeDef TimHandle; | |
| 69 | |
| 70 /* USER CODE END 0 */ | |
| 71 /* External variables --------------------------------------------------------*/ | |
| 72 | |
| 73 /******************************************************************************/ | |
| 74 /* Cortex-M4 Processor Interruption and Exception Handlers */ | |
| 75 /******************************************************************************/ | |
| 76 | |
| 77 /** | |
| 78 * @brief This function handles System tick timer. | |
| 79 */ | |
| 80 void SysTick_Handler(void) | |
| 81 { | |
| 82 /* USER CODE BEGIN SysTick_IRQn 0 */ | |
| 83 | |
| 84 /* USER CODE END SysTick_IRQn 0 */ | |
| 85 HAL_IncTick(); | |
| 86 HAL_SYSTICK_IRQHandler(); | |
| 87 /* USER CODE BEGIN SysTick_IRQn 1 */ | |
| 88 | |
| 89 /* USER CODE END SysTick_IRQn 1 */ | |
| 90 } | |
| 91 | |
| 92 /* USER CODE BEGIN 1 */ | |
| 93 void DMA2D_IRQHandler(void) | |
| 94 { | |
| 95 HAL_DMA2D_IRQHandler(&Dma2dHandle); | |
| 96 } | |
| 97 | |
| 98 | |
| 99 void DMA2_Stream0_IRQHandler(void) | |
| 100 { | |
| 101 HAL_DMA_IRQHandler(cpu2DmaSpi.hdmarx); | |
| 102 } | |
| 103 | |
| 104 | |
| 105 void DMA2_Stream3_IRQHandler(void) | |
| 106 { | |
| 107 HAL_DMA_IRQHandler(cpu2DmaSpi.hdmatx); | |
| 108 } | |
| 109 | |
| 110 | |
| 111 void EXTI0_IRQHandler(void) | |
| 112 { | |
| 113 HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_0); | |
| 114 } | |
| 115 | |
| 116 void EXTI1_IRQHandler(void) | |
| 117 { | |
| 118 HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_1); | |
| 119 } | |
| 120 | |
| 121 void EXTI2_IRQHandler(void) | |
| 122 { | |
| 123 HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_2); | |
| 124 } | |
| 125 | |
| 126 void EXTI3_IRQHandler(void) | |
| 127 { | |
| 128 HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_3); | |
| 129 } | |
| 130 | |
| 131 void EXTI4_IRQHandler(void) | |
| 132 { | |
| 133 HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_4); | |
| 134 } | |
| 135 | |
| 136 | |
| 137 void USART1_IRQHandler(void) | |
| 138 { | |
| 139 HAL_UART_IRQHandler(&UartHandle); | |
| 140 } | |
| 141 | |
| 142 | |
| 143 #ifdef USART_IR_HUD | |
| 144 void USART2_IRQHandler(void) | |
| 145 { | |
| 146 HAL_UART_IRQHandler(&UartIR_HUD_Handle); | |
| 147 } | |
| 148 #endif | |
| 149 | |
| 150 | |
| 151 void TIM4_IRQHandler(void) | |
| 152 { | |
| 153 MX_TestPin_Low(); | |
| 154 HAL_TIM_IRQHandler(&TimHandle); | |
| 155 MX_TestPin_High(); | |
| 156 } | |
| 157 | |
| 158 | |
| 159 #ifdef DEMOMODE | |
| 160 void TIM7_IRQHandler(void) | |
| 161 { | |
| 162 HAL_TIM_IRQHandler(&TimDemoHandle); | |
| 163 } | |
| 164 #endif |
