More EXTI handlers, few comment fixes.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@13229 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
7486e08750
commit
50116fa76f
|
@ -70,7 +70,7 @@ static inline void exti0_1_irq_deinit(void) {
|
|||
#if (HAL_USE_PAL && (PAL_USE_WAIT || PAL_USE_CALLBACKS)) || defined(__DOXYGEN__)
|
||||
#if !defined(STM32_DISABLE_EXTI0_1_HANDLER)
|
||||
/**
|
||||
* @brief EXTI[0] interrupt handler.
|
||||
* @brief EXTI[0], EXTI[1] interrupt handler.
|
||||
*
|
||||
* @isr
|
||||
*/
|
||||
|
|
|
@ -70,7 +70,7 @@ static inline void exti1_irq_deinit(void) {
|
|||
#if (HAL_USE_PAL && (PAL_USE_WAIT || PAL_USE_CALLBACKS)) || defined(__DOXYGEN__)
|
||||
#if !defined(STM32_DISABLE_EXTI1_HANDLER)
|
||||
/**
|
||||
* @brief EXTI[0] interrupt handler.
|
||||
* @brief EXTI[1] interrupt handler.
|
||||
*
|
||||
* @isr
|
||||
*/
|
||||
|
|
|
@ -70,7 +70,7 @@ static inline void exti10_15_irq_deinit(void) {
|
|||
#if (HAL_USE_PAL && (PAL_USE_WAIT || PAL_USE_CALLBACKS)) || defined(__DOXYGEN__)
|
||||
#if !defined(STM32_DISABLE_EXTI10_15_HANDLER)
|
||||
/**
|
||||
* @brief EXTI[0] interrupt handler.
|
||||
* @brief EXTI[10]..EXTI[15] interrupt handler.
|
||||
*
|
||||
* @isr
|
||||
*/
|
||||
|
|
|
@ -0,0 +1,101 @@
|
|||
/*
|
||||
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 EXTIv1/stm32_exti16-40_41.inc
|
||||
* @brief Shared EXTI16-40_41 handler.
|
||||
*
|
||||
* @addtogroup STM32_EXTI164041_HANDLER
|
||||
* @{
|
||||
*/
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Driver local definitions. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Derived constants and error checks. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/* Priority settings checks.*/
|
||||
#if !defined(STM32_IRQ_EXTI164041_PRIORITY)
|
||||
#error "STM32_IRQ_EXTI164041_PRIORITY not defined in mcuconf.h"
|
||||
#endif
|
||||
|
||||
#if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI164041_PRIORITY)
|
||||
#error "Invalid IRQ priority assigned to STM32_IRQ_EXTI164041_PRIORITY"
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Driver exported variables. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Driver local variables. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Driver local functions. */
|
||||
/*===========================================================================*/
|
||||
|
||||
static inline void exti10_exti40_41_irq_init(void) {
|
||||
#if defined(STM32_EXTI16_IS_USED) || defined(STM32_EXTI40_IS_USED) || \
|
||||
defined(STM32_EXTI41_IS_USED)
|
||||
nvicEnableVector(STM32_EXTI164041_NUMBER, STM32_IRQ_EXTI10_15_PRIORITY);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void exti10_exti40_41_irq_deinit(void) {
|
||||
#if defined(STM32_EXTI16_IS_USED) || defined(STM32_EXTI40_IS_USED) || \
|
||||
defined(STM32_EXTI41_IS_USED)
|
||||
nvicDisableVector(STM32_EXTI164041_NUMBER);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Driver interrupt handlers. */
|
||||
/*===========================================================================*/
|
||||
|
||||
#if defined(STM32_EXTI16_IS_USED) || defined(STM32_EXTI40_IS_USED) || \
|
||||
defined(STM32_EXTI41_IS_USED) || defined(__DOXYGEN__)
|
||||
#if !defined(STM32_DISABLE_EXTI164041_HANDLER)
|
||||
/**
|
||||
* @brief EXTI[16], EXTI[40], EXTI[41] interrupt handler.
|
||||
*
|
||||
* @isr
|
||||
*/
|
||||
OSAL_IRQ_HANDLER(STM32_EXTI164041_HANDLER) {
|
||||
uint32_t pr1, pr2;
|
||||
|
||||
OSAL_IRQ_PROLOGUE();
|
||||
|
||||
extiGetAndClearGroup1(1U << 16);
|
||||
extiGetAndClearGroup2((1U << (40 - 32)) | (1U << (41 - 32)), pr2);
|
||||
|
||||
exti_serve_irq(pr1, 16);
|
||||
exti_serve_irq(pr2, (40 - 32));
|
||||
exti_serve_irq(pr2, (41 - 32));
|
||||
|
||||
OSAL_IRQ_EPILOGUE();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Driver exported functions. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/** @} */
|
|
@ -70,7 +70,7 @@ static inline void exti16_irq_deinit(void) {
|
|||
#if defined(STM32_EXTI16_IS_USED) || defined(__DOXYGEN__)
|
||||
#if !defined(STM32_DISABLE_EXTI16_HANDLER)
|
||||
/**
|
||||
* @brief EXTI[0] interrupt handler.
|
||||
* @brief EXTI[16] interrupt handler.
|
||||
*
|
||||
* @isr
|
||||
*/
|
||||
|
|
|
@ -70,7 +70,7 @@ static inline void exti17_irq_deinit(void) {
|
|||
#if defined(STM32_EXTI17_IS_USED) || defined(__DOXYGEN__)
|
||||
#if !defined(STM32_DISABLE_EXTI17_HANDLER)
|
||||
/**
|
||||
* @brief EXTI[0] interrupt handler.
|
||||
* @brief EXTI[17] interrupt handler.
|
||||
*
|
||||
* @isr
|
||||
*/
|
||||
|
|
|
@ -70,7 +70,7 @@ static inline void exti18_irq_deinit(void) {
|
|||
#if defined(STM32_EXTI18_IS_USED) || defined(__DOXYGEN__)
|
||||
#if !defined(STM32_DISABLE_EXTI18_HANDLER)
|
||||
/**
|
||||
* @brief EXTI[0] interrupt handler.
|
||||
* @brief EXTI[18] interrupt handler.
|
||||
*
|
||||
* @isr
|
||||
*/
|
||||
|
|
|
@ -70,7 +70,7 @@ static inline void exti19_irq_deinit(void) {
|
|||
#if defined(STM32_EXTI19_IS_USED) || defined(__DOXYGEN__)
|
||||
#if !defined(STM32_DISABLE_EXTI19_HANDLER)
|
||||
/**
|
||||
* @brief EXTI[0] interrupt handler.
|
||||
* @brief EXTI[19] interrupt handler.
|
||||
*
|
||||
* @isr
|
||||
*/
|
||||
|
|
|
@ -70,7 +70,7 @@ static inline void exti2_irq_deinit(void) {
|
|||
#if (HAL_USE_PAL && (PAL_USE_WAIT || PAL_USE_CALLBACKS)) || defined(__DOXYGEN__)
|
||||
#if !defined(STM32_DISABLE_EXTI2_HANDLER)
|
||||
/**
|
||||
* @brief EXTI[0] interrupt handler.
|
||||
* @brief EXTI[2] interrupt handler.
|
||||
*
|
||||
* @isr
|
||||
*/
|
||||
|
|
|
@ -70,7 +70,7 @@ static inline void exti20_irq_deinit(void) {
|
|||
#if defined(STM32_EXTI20_IS_USED) || defined(__DOXYGEN__)
|
||||
#if !defined(STM32_DISABLE_EXTI20_HANDLER)
|
||||
/**
|
||||
* @brief EXTI[0] interrupt handler.
|
||||
* @brief EXTI[20] interrupt handler.
|
||||
*
|
||||
* @isr
|
||||
*/
|
||||
|
|
|
@ -70,7 +70,7 @@ static inline void exti21_irq_deinit(void) {
|
|||
#if defined(STM32_EXTI21_IS_USED) || defined(__DOXYGEN__)
|
||||
#if !defined(STM32_DISABLE_EXTI21_HANDLER)
|
||||
/**
|
||||
* @brief EXTI[0] interrupt handler.
|
||||
* @brief EXTI[21] interrupt handler.
|
||||
*
|
||||
* @isr
|
||||
*/
|
||||
|
|
|
@ -70,7 +70,7 @@ static inline void exti22_irq_deinit(void) {
|
|||
#if defined(STM32_EXTI22_IS_USED) || defined(__DOXYGEN__)
|
||||
#if !defined(STM32_DISABLE_EXTI22_HANDLER)
|
||||
/**
|
||||
* @brief EXTI[0] interrupt handler.
|
||||
* @brief EXTI[22] interrupt handler.
|
||||
*
|
||||
* @isr
|
||||
*/
|
||||
|
|
|
@ -70,7 +70,7 @@ static inline void exti23_irq_deinit(void) {
|
|||
#if defined(STM32_EXTI23_IS_USED) || defined(__DOXYGEN__)
|
||||
#if !defined(STM32_DISABLE_EXTI23_HANDLER)
|
||||
/**
|
||||
* @brief EXTI[0] interrupt handler.
|
||||
* @brief EXTI[23] interrupt handler.
|
||||
*
|
||||
* @isr
|
||||
*/
|
||||
|
|
|
@ -70,7 +70,7 @@ static inline void exti2_3_irq_deinit(void) {
|
|||
#if (HAL_USE_PAL && (PAL_USE_WAIT || PAL_USE_CALLBACKS)) || defined(__DOXYGEN__)
|
||||
#if !defined(STM32_DISABLE_EXTI2_3_HANDLER)
|
||||
/**
|
||||
* @brief EXTI[0] interrupt handler.
|
||||
* @brief EXTI[2], EXTI[3] interrupt handler.
|
||||
*
|
||||
* @isr
|
||||
*/
|
||||
|
|
|
@ -70,7 +70,7 @@ static inline void exti3_irq_deinit(void) {
|
|||
#if (HAL_USE_PAL && (PAL_USE_WAIT || PAL_USE_CALLBACKS)) || defined(__DOXYGEN__)
|
||||
#if !defined(STM32_DISABLE_EXTI3_HANDLER)
|
||||
/**
|
||||
* @brief EXTI[0] interrupt handler.
|
||||
* @brief EXTI[3] interrupt handler.
|
||||
*
|
||||
* @isr
|
||||
*/
|
||||
|
|
|
@ -0,0 +1,97 @@
|
|||
/*
|
||||
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 EXTIv1/stm32_exti33.inc
|
||||
* @brief Shared EXTI33 handler.
|
||||
*
|
||||
* @addtogroup STM32_EXTI33_HANDLER
|
||||
* @{
|
||||
*/
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Driver local definitions. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Derived constants and error checks. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/* Priority settings checks.*/
|
||||
#if !defined(STM32_IRQ_EXTI33_PRIORITY)
|
||||
#error "STM32_IRQ_EXTI33_PRIORITY not defined in mcuconf.h"
|
||||
#endif
|
||||
|
||||
#if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI33_PRIORITY)
|
||||
#error "Invalid IRQ priority assigned to STM32_IRQ_EXTI33_PRIORITY"
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Driver exported variables. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Driver local variables. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Driver local functions. */
|
||||
/*===========================================================================*/
|
||||
|
||||
static inline void exti33_irq_init(void) {
|
||||
#if defined(STM32_EXTI33_IS_USED)
|
||||
nvicEnableVector(STM32_EXTI33_NUMBER, STM32_IRQ_EXTI33_PRIORITY);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void exti33_irq_deinit(void) {
|
||||
#if defined(STM32_EXTI33_IS_USED)
|
||||
nvicDisableVector(STM32_EXTI33_NUMBER);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Driver interrupt handlers. */
|
||||
/*===========================================================================*/
|
||||
|
||||
#if defined(STM32_EXTI33_IS_USED) || defined(__DOXYGEN__)
|
||||
#if !defined(STM32_DISABLE_EXTI33_HANDLER)
|
||||
/**
|
||||
* @brief EXTI[33] interrupt handler.
|
||||
*
|
||||
* @isr
|
||||
*/
|
||||
OSAL_IRQ_HANDLER(STM32_EXTI33_HANDLER) {
|
||||
uint32_t pr;
|
||||
|
||||
OSAL_IRQ_PROLOGUE();
|
||||
|
||||
extiGetAndClearGroup2(1U << (33 - 32), pr);
|
||||
|
||||
#if defined(STM32_EXTI33_ISR)
|
||||
STM32_EXTI33_ISR(pr, (33 - 32));
|
||||
#endif
|
||||
|
||||
OSAL_IRQ_EPILOGUE();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Driver exported functions. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/** @} */
|
|
@ -70,7 +70,7 @@ static inline void exti4_irq_deinit(void) {
|
|||
#if (HAL_USE_PAL && (PAL_USE_WAIT || PAL_USE_CALLBACKS)) || defined(__DOXYGEN__)
|
||||
#if !defined(STM32_DISABLE_EXTI4_HANDLER)
|
||||
/**
|
||||
* @brief EXTI[0] interrupt handler.
|
||||
* @brief EXTI[4] interrupt handler.
|
||||
*
|
||||
* @isr
|
||||
*/
|
||||
|
|
|
@ -70,7 +70,7 @@ static inline void exti4_15_irq_deinit(void) {
|
|||
#if (HAL_USE_PAL && (PAL_USE_WAIT || PAL_USE_CALLBACKS)) || defined(__DOXYGEN__)
|
||||
#if !defined(STM32_DISABLE_EXTI4_15_HANDLER)
|
||||
/**
|
||||
* @brief EXTI[0] interrupt handler.
|
||||
* @brief EXTI[4]..EXTI[15] interrupt handler.
|
||||
*
|
||||
* @isr
|
||||
*/
|
||||
|
|
|
@ -70,7 +70,7 @@ static inline void exti5_9_irq_deinit(void) {
|
|||
#if (HAL_USE_PAL && (PAL_USE_WAIT || PAL_USE_CALLBACKS)) || defined(__DOXYGEN__)
|
||||
#if !defined(STM32_DISABLE_EXTI5_9_HANDLER)
|
||||
/**
|
||||
* @brief EXTI[0] interrupt handler.
|
||||
* @brief EXTI[5]..EXTI[9] interrupt handler.
|
||||
*
|
||||
* @isr
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue