Subversion Repositories FuelGauge

Rev

Rev 3 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. /* USER CODE BEGIN Header */
  2. /**
  3.   ******************************************************************************
  4.   * @file    stm32f0xx_it.c
  5.   * @brief   Interrupt Service Routines.
  6.   ******************************************************************************
  7.   * @attention
  8.   *
  9.   * <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
  10.   * All rights reserved.</center></h2>
  11.   *
  12.   * This software component is licensed by ST under BSD 3-Clause license,
  13.   * the "License"; You may not use this file except in compliance with the
  14.   * License. You may obtain a copy of the License at:
  15.   *                        opensource.org/licenses/BSD-3-Clause
  16.   *
  17.   ******************************************************************************
  18.   */
  19. /* USER CODE END Header */
  20.  
  21. /* Includes ------------------------------------------------------------------*/
  22. #include "main.h"
  23. #include "stm32f0xx_it.h"
  24. /* Private includes ----------------------------------------------------------*/
  25. /* USER CODE BEGIN Includes */
  26. /* USER CODE END Includes */
  27.  
  28. /* Private typedef -----------------------------------------------------------*/
  29. /* USER CODE BEGIN TD */
  30.  
  31. /* USER CODE END TD */
  32.  
  33. /* Private define ------------------------------------------------------------*/
  34. /* USER CODE BEGIN PD */
  35.  
  36. /* USER CODE END PD */
  37.  
  38. /* Private macro -------------------------------------------------------------*/
  39. /* USER CODE BEGIN PM */
  40.  
  41. /* USER CODE END PM */
  42.  
  43. /* Private variables ---------------------------------------------------------*/
  44. /* USER CODE BEGIN PV */
  45.  
  46. /* USER CODE END PV */
  47.  
  48. /* Private function prototypes -----------------------------------------------*/
  49. /* USER CODE BEGIN PFP */
  50.  
  51. /* USER CODE END PFP */
  52.  
  53. /* Private user code ---------------------------------------------------------*/
  54. /* USER CODE BEGIN 0 */
  55.  
  56. /* USER CODE END 0 */
  57.  
  58. /* External variables --------------------------------------------------------*/
  59. extern DMA_HandleTypeDef hdma_adc;
  60. /* USER CODE BEGIN EV */
  61.  
  62. /* USER CODE END EV */
  63.  
  64. /******************************************************************************/
  65. /*           Cortex-M0 Processor Interruption and Exception Handlers          */
  66. /******************************************************************************/
  67. /**
  68.   * @brief This function handles Non maskable interrupt.
  69.   */
  70. void NMI_Handler(void)
  71. {
  72.   /* USER CODE BEGIN NonMaskableInt_IRQn 0 */
  73.  
  74.   /* USER CODE END NonMaskableInt_IRQn 0 */
  75.   /* USER CODE BEGIN NonMaskableInt_IRQn 1 */
  76.  
  77.   /* USER CODE END NonMaskableInt_IRQn 1 */
  78. }
  79.  
  80. /**
  81.   * @brief This function handles Hard fault interrupt.
  82.   */
  83. void HardFault_Handler(void)
  84. {
  85.   /* USER CODE BEGIN HardFault_IRQn 0 */
  86.  
  87.   /* USER CODE END HardFault_IRQn 0 */
  88.   while (1)
  89.   {
  90.     /* USER CODE BEGIN W1_HardFault_IRQn 0 */
  91.     /* USER CODE END W1_HardFault_IRQn 0 */
  92.   }
  93. }
  94.  
  95. /**
  96.   * @brief This function handles System service call via SWI instruction.
  97.   */
  98. void SVC_Handler(void)
  99. {
  100.   /* USER CODE BEGIN SVC_IRQn 0 */
  101.  
  102.   /* USER CODE END SVC_IRQn 0 */
  103.   /* USER CODE BEGIN SVC_IRQn 1 */
  104.  
  105.   /* USER CODE END SVC_IRQn 1 */
  106. }
  107.  
  108. /**
  109.   * @brief This function handles Pendable request for system service.
  110.   */
  111. void PendSV_Handler(void)
  112. {
  113.   /* USER CODE BEGIN PendSV_IRQn 0 */
  114.  
  115.   /* USER CODE END PendSV_IRQn 0 */
  116.   /* USER CODE BEGIN PendSV_IRQn 1 */
  117.  
  118.   /* USER CODE END PendSV_IRQn 1 */
  119. }
  120.  
  121. /**
  122.   * @brief This function handles System tick timer.
  123.   */
  124. void SysTick_Handler(void)
  125. {
  126.   /* USER CODE BEGIN SysTick_IRQn 0 */
  127.  
  128.   /* USER CODE END SysTick_IRQn 0 */
  129.   HAL_IncTick();
  130.   /* USER CODE BEGIN SysTick_IRQn 1 */
  131.  
  132.   /* USER CODE END SysTick_IRQn 1 */
  133. }
  134.  
  135. /******************************************************************************/
  136. /* STM32F0xx Peripheral Interrupt Handlers                                    */
  137. /* Add here the Interrupt Handlers for the used peripherals.                  */
  138. /* For the available peripheral interrupt handler names,                      */
  139. /* please refer to the startup file (startup_stm32f0xx.s).                    */
  140. /******************************************************************************/
  141.  
  142. /**
  143.   * @brief This function handles DMA1 channel 1 interrupt.
  144.   */
  145. void DMA1_Channel1_IRQHandler(void)
  146. {
  147.   /* USER CODE BEGIN DMA1_Channel1_IRQn 0 */
  148.  
  149.   /* USER CODE END DMA1_Channel1_IRQn 0 */
  150.   HAL_DMA_IRQHandler(&hdma_adc);
  151.   /* USER CODE BEGIN DMA1_Channel1_IRQn 1 */
  152.  
  153.   /* USER CODE END DMA1_Channel1_IRQn 1 */
  154. }
  155.  
  156. /* USER CODE BEGIN 1 */
  157.  
  158. /* USER CODE END 1 */
  159. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
  160.