leds.c
void DMA1_Stream0_IRQHandler()
{
    /* Disable interrupts and other tasks from running during this interrupt. */
    UBaseType_t uxSavedInterruptStatus = taskENTER_CRITICAL_FROM_ISR();

    if( DMA_GetFlagStatus( DMA1_Stream0, DMA_FLAG_TCIF0 ) )
    {
        /* Clear DMA interrupt flags */
        DMA_ClearFlag( DMA1_Stream0, DMA_FLAG_TCIF0 );
        DMA_ClearFlag( DMA1_Stream0, DMA_FLAG_HTIF0 );
        DMA_ClearFlag( DMA1_Stream0, DMA_FLAG_FEIF0 );

        /* Disable timer 4 */
        TIM_Cmd( TIM4, DISABLE );

        /* Disable DMA stream 0 */
        DMA_Cmd( DMA1_Stream0, DISABLE );

        /* Reset the B6 pin to off. */
        GPIOB->ODR &= ~( 0x01 << 6 );
    }

    /* Re-enable interrupts and other tasks. */
    taskEXIT_CRITICAL_FROM_ISR( uxSavedInterruptStatus );
}
/**
  * @brief  Interrupt to handle the end of the DMA stream to the LEDs.
  * @param  None
  * @retval None
  */
@brief  Interrupt to handle the end of the DMA stream to the LEDs.
@param  None
@retval None
@brief Interrupt to handle the end of the DMA stream to the LEDs . @param None @retval None
void DMA1_Stream0_IRQHandler()
{
    UBaseType_t uxSavedInterruptStatus = taskENTER_CRITICAL_FROM_ISR();
    if( DMA_GetFlagStatus( DMA1_Stream0, DMA_FLAG_TCIF0 ) )
    {
        DMA_ClearFlag( DMA1_Stream0, DMA_FLAG_TCIF0 );
        DMA_ClearFlag( DMA1_Stream0, DMA_FLAG_HTIF0 );
        DMA_ClearFlag( DMA1_Stream0, DMA_FLAG_FEIF0 );
        TIM_Cmd( TIM4, DISABLE );
        DMA_Cmd( DMA1_Stream0, DISABLE );
        GPIOB->ODR &= ~( 0x01 << 6 );
    }
    taskEXIT_CRITICAL_FROM_ISR( uxSavedInterruptStatus );
}
void DMA1_Stream0_IRQHandler ( ) { UBaseType_t uxSavedInterruptStatus = taskENTER_CRITICAL_FROM_ISR ( ) ; if ( DMA_GetFlagStatus ( DMA1_Stream0 , DMA_FLAG_TCIF0 ) ) { DMA_ClearFlag ( DMA1_Stream0 , DMA_FLAG_TCIF0 ) ; DMA_ClearFlag ( DMA1_Stream0 , DMA_FLAG_HTIF0 ) ; DMA_ClearFlag ( DMA1_Stream0 , DMA_FLAG_FEIF0 ) ; TIM_Cmd ( TIM4 , DISABLE ) ; DMA_Cmd ( DMA1_Stream0 , DISABLE ) ; GPIOB -> ODR &= ~ ( 0x01 << 6 ) ; } taskEXIT_CRITICAL_FROM_ISR ( uxSavedInterruptStatus ) ; }
@brief  Interrupt to handle the end of the DMA stream to the LEDs.
@brief Interrupt to handle the end of the DMA stream to the LEDs .
/* Disable interrupts and other tasks from running during this interrupt. */ /* Clear DMA interrupt flags */ /* Disable timer 4 */ /* Disable DMA stream 0 */ /* Reset the B6 pin to off. */ /* Re-enable interrupts and other tasks. */