xref: /btstack/port/stm32-f4discovery-usb/bsp/audio.c (revision f763b8ceaf9411e1c5e999bc4423cdc8accb9a47)
1*f763b8ceSMatthias Ringwald #include "stm32f4_discovery_audio.h"
2*f763b8ceSMatthias Ringwald 
3*f763b8ceSMatthias Ringwald // support for I2S/I2C CS43L22 codec is provided by bsp/stm32f4_discovery_audio.c and not by STM32CubeMX
4*f763b8ceSMatthias Ringwald // we need to provide the missing IRQ handler somewhere
5*f763b8ceSMatthias Ringwald 
6*f763b8ceSMatthias Ringwald extern I2S_HandleTypeDef  hAudioOutI2s;
7*f763b8ceSMatthias Ringwald extern I2S_HandleTypeDef  hAudioInI2s;
8*f763b8ceSMatthias Ringwald 
9*f763b8ceSMatthias Ringwald /**
10*f763b8ceSMatthias Ringwald   * @brief  This function handles main I2S interrupt.
11*f763b8ceSMatthias Ringwald   * @param  None
12*f763b8ceSMatthias Ringwald   * @retval 0 if correct communication, else wrong communication
13*f763b8ceSMatthias Ringwald   */
DMA1_Stream7_IRQHandler(void)14*f763b8ceSMatthias Ringwald void DMA1_Stream7_IRQHandler(void)
15*f763b8ceSMatthias Ringwald {
16*f763b8ceSMatthias Ringwald   HAL_DMA_IRQHandler(hAudioOutI2s.hdmatx);
17*f763b8ceSMatthias Ringwald }
18*f763b8ceSMatthias Ringwald 
19*f763b8ceSMatthias Ringwald /**
20*f763b8ceSMatthias Ringwald   * @brief  This function handles main I2S interrupt.
21*f763b8ceSMatthias Ringwald   * @param  None
22*f763b8ceSMatthias Ringwald   * @retval 0 if correct communication, else wrong communication
23*f763b8ceSMatthias Ringwald   */
DMA1_Stream3_IRQHandler(void)24*f763b8ceSMatthias Ringwald void DMA1_Stream3_IRQHandler(void)
25*f763b8ceSMatthias Ringwald {
26*f763b8ceSMatthias Ringwald   HAL_DMA_IRQHandler(hAudioInI2s.hdmarx);
27*f763b8ceSMatthias Ringwald }
28