stm32f7xx_it.c 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /**
  2. ******************************************************************************
  3. * @file BSP/Src/stm32f7xx_it.c
  4. * @author MCD Application Team
  5. * @version V1.1.0
  6. * @date 30-December-2016
  7. * @brief Main Interrupt Service Routines.
  8. * This file provides template for all exceptions handler and
  9. * peripherals interrupt service routine.
  10. ******************************************************************************
  11. * @attention
  12. *
  13. * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
  14. *
  15. * Redistribution and use in source and binary forms, with or without modification,
  16. * are permitted provided that the following conditions are met:
  17. * 1. Redistributions of source code must retain the above copyright notice,
  18. * this list of conditions and the following disclaimer.
  19. * 2. Redistributions in binary form must reproduce the above copyright notice,
  20. * this list of conditions and the following disclaimer in the documentation
  21. * and/or other materials provided with the distribution.
  22. * 3. Neither the name of STMicroelectronics nor the names of its contributors
  23. * may be used to endorse or promote products derived from this software
  24. * without specific prior written permission.
  25. *
  26. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  27. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  28. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  29. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  30. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  31. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  32. * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  33. * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  34. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  35. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  36. *
  37. ******************************************************************************
  38. */
  39. /* Includes ------------------------------------------------------------------*/
  40. #include "stm32f7xx_it.h"
  41. #include "task.h"
  42. extern volatile int AudioPulse;
  43. /** @addtogroup STM32F7xx_HAL_Examples
  44. * @{
  45. */
  46. /** @addtogroup BSP
  47. * @{
  48. */
  49. /* Private typedef -----------------------------------------------------------*/
  50. /* Private define ------------------------------------------------------------*/
  51. /* Private macro -------------------------------------------------------------*/
  52. /* Private variables ---------------------------------------------------------*/
  53. //extern DMA_HandleTypeDef hdma;
  54. /*DMA status declared in "sdram_dma.c" file */
  55. //extern uint32_t uwDMA_Transfer_Complete;
  56. /* SAI handler declared in "stm32746g_discovery_audio.c" file */
  57. extern SAI_HandleTypeDef haudio_out_sai;
  58. /* SAI handler declared in "stm32746g_discovery_audio.c" file */
  59. extern SAI_HandleTypeDef haudio_in_sai;
  60. /* Private function prototypes -----------------------------------------------*/
  61. /* Private functions ---------------------------------------------------------*/
  62. /******************************************************************************/
  63. /* Cortex-M7 Processor Exceptions Handlers */
  64. /******************************************************************************/
  65. /**
  66. * @brief This function handles DMA2 Stream 7 interrupt request.
  67. * @param None
  68. * @retval None
  69. */
  70. void AUDIO_IN_SAIx_DMAx_IRQHandler(void)
  71. {
  72. HAL_DMA_IRQHandler(haudio_in_sai.hdmarx);
  73. }
  74. /**
  75. * @brief DMA interrupt handler.
  76. * @param None
  77. * @retval None
  78. */
  79. //void DMA2_Stream1_IRQHandler(void)
  80. //{
  81. // BSP_CAMERA_DMA_IRQHandler();
  82. //}
  83. /**
  84. * @brief This function handles DMA2 Stream 6 interrupt request.
  85. * @param None
  86. * @retval None
  87. */
  88. void AUDIO_OUT_SAIx_DMAx_IRQHandler(void)
  89. {
  90. HAL_DMA_IRQHandler(haudio_out_sai.hdmatx);
  91. trigger_event(EV_AUDIOBUFF);
  92. }