Introduced shared handlers for DMAv1.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@13043 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
8420e938c6
commit
40c9ee7c73
|
@ -0,0 +1,78 @@
|
||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file DMAv1/stm32_dma1_ch23.inc
|
||||||
|
* @brief Shared DMA1 Channels 2 and 3 handler.
|
||||||
|
*
|
||||||
|
* @addtogroup STM32_DMA1_CH23_HANDLER
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Driver local definitions. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Derived constants and error checks. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/* Other checks.*/
|
||||||
|
#if !defined(STM32_DMA1_CH23_HANDLER)
|
||||||
|
#error "STM32_DMA1_CH23_HANDLER not defined in stm32_isr.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Driver exported variables. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Driver local variables. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Driver local functions. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Driver interrupt handlers. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
#if defined(STM32_DMA_REQUIRED) || defined(__DOXYGEN__)
|
||||||
|
/**
|
||||||
|
* @brief DMA1 streams 2 and 3 shared ISR.
|
||||||
|
*
|
||||||
|
* @isr
|
||||||
|
*/
|
||||||
|
OSAL_IRQ_HANDLER(STM32_DMA1_CH23_HANDLER) {
|
||||||
|
|
||||||
|
OSAL_IRQ_PROLOGUE();
|
||||||
|
|
||||||
|
/* Check on channel 2.*/
|
||||||
|
dmaServeInterrupt(STM32_DMA1_STREAM2);
|
||||||
|
|
||||||
|
/* Check on channel 3.*/
|
||||||
|
dmaServeInterrupt(STM32_DMA1_STREAM3);
|
||||||
|
|
||||||
|
OSAL_IRQ_EPILOGUE();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Driver exported functions. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/** @} */
|
|
@ -0,0 +1,84 @@
|
||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file DMAv1/stm32_dma1_ch4567.inc
|
||||||
|
* @brief Shared DMA1 Channels 4, 5, 6 and 7 handler.
|
||||||
|
*
|
||||||
|
* @addtogroup STM32_DMA1_CH4567_HANDLER
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Driver local definitions. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Derived constants and error checks. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/* Other checks.*/
|
||||||
|
#if !defined(STM32_DMA1_CH4567_HANDLER)
|
||||||
|
#error "STM32_DMA1_CH4567_HANDLER not defined in stm32_isr.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Driver exported variables. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Driver local variables. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Driver local functions. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Driver interrupt handlers. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
#if defined(STM32_DMA_REQUIRED) || defined(__DOXYGEN__)
|
||||||
|
/**
|
||||||
|
* @brief DMA1 streams 4, 5, 6 and 7 shared ISR.
|
||||||
|
*
|
||||||
|
* @isr
|
||||||
|
*/
|
||||||
|
OSAL_IRQ_HANDLER(STM32_DMA1_CH4567_HANDLER) {
|
||||||
|
|
||||||
|
OSAL_IRQ_PROLOGUE();
|
||||||
|
|
||||||
|
/* Check on channel 4.*/
|
||||||
|
dmaServeInterrupt(STM32_DMA1_STREAM4);
|
||||||
|
|
||||||
|
/* Check on channel 5.*/
|
||||||
|
dmaServeInterrupt(STM32_DMA1_STREAM5);
|
||||||
|
|
||||||
|
/* Check on channel 6.*/
|
||||||
|
dmaServeInterrupt(STM32_DMA1_STREAM6);
|
||||||
|
|
||||||
|
/* Check on channel 7.*/
|
||||||
|
dmaServeInterrupt(STM32_DMA1_STREAM7);
|
||||||
|
|
||||||
|
OSAL_IRQ_EPILOGUE();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Driver exported functions. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/** @} */
|
|
@ -51,6 +51,9 @@
|
||||||
/* Driver interrupt handlers. */
|
/* Driver interrupt handlers. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
#include "stm32_dma1_ch23.inc"
|
||||||
|
#include "stm32_dma1_ch4567.inc"
|
||||||
|
|
||||||
#include "stm32_exti0_1.inc"
|
#include "stm32_exti0_1.inc"
|
||||||
#include "stm32_exti2_3.inc"
|
#include "stm32_exti2_3.inc"
|
||||||
#include "stm32_exti4_15.inc"
|
#include "stm32_exti4_15.inc"
|
||||||
|
@ -73,52 +76,6 @@
|
||||||
#include "stm32_tim16.inc"
|
#include "stm32_tim16.inc"
|
||||||
#include "stm32_tim17.inc"
|
#include "stm32_tim17.inc"
|
||||||
|
|
||||||
#if defined(STM32_DMA_REQUIRED) || defined(__DOXYGEN__)
|
|
||||||
/**
|
|
||||||
* @brief DMA1 streams 2 and 3 shared ISR.
|
|
||||||
* @note It is declared here because this device has a non-standard
|
|
||||||
* DMA shared IRQ handler.
|
|
||||||
*
|
|
||||||
* @isr
|
|
||||||
*/
|
|
||||||
OSAL_IRQ_HANDLER(STM32_DMA1_CH23_HANDLER) {
|
|
||||||
|
|
||||||
OSAL_IRQ_PROLOGUE();
|
|
||||||
|
|
||||||
/* Check on channel 2.*/
|
|
||||||
dmaServeInterrupt(STM32_DMA1_STREAM2);
|
|
||||||
|
|
||||||
/* Check on channel 3.*/
|
|
||||||
dmaServeInterrupt(STM32_DMA1_STREAM3);
|
|
||||||
|
|
||||||
OSAL_IRQ_EPILOGUE();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief DMA1 streams 4, 5, 6 and 7 shared ISR.
|
|
||||||
*
|
|
||||||
* @isr
|
|
||||||
*/
|
|
||||||
OSAL_IRQ_HANDLER(STM32_DMA1_CH4567_HANDLER) {
|
|
||||||
|
|
||||||
OSAL_IRQ_PROLOGUE();
|
|
||||||
|
|
||||||
/* Check on channel 4.*/
|
|
||||||
dmaServeInterrupt(STM32_DMA1_STREAM4);
|
|
||||||
|
|
||||||
/* Check on channel 5.*/
|
|
||||||
dmaServeInterrupt(STM32_DMA1_STREAM5);
|
|
||||||
|
|
||||||
/* Check on channel 6.*/
|
|
||||||
dmaServeInterrupt(STM32_DMA1_STREAM6);
|
|
||||||
|
|
||||||
/* Check on channel 7.*/
|
|
||||||
dmaServeInterrupt(STM32_DMA1_STREAM7);
|
|
||||||
|
|
||||||
OSAL_IRQ_EPILOGUE();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Driver exported functions. */
|
/* Driver exported functions. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
Loading…
Reference in New Issue