2013-08-21 14:54:22 +00:00
|
|
|
/*
|
2015-01-11 13:56:55 +00:00
|
|
|
ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
|
2013-08-21 14:54:22 +00:00
|
|
|
|
|
|
|
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 STM32F4xx/ext_lld_isr.c
|
|
|
|
* @brief STM32F4xx/STM32F2xx EXT subsystem low level driver ISR code.
|
|
|
|
*
|
|
|
|
* @addtogroup EXT
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "hal.h"
|
|
|
|
|
|
|
|
#if HAL_USE_EXT || defined(__DOXYGEN__)
|
|
|
|
|
|
|
|
#include "ext_lld_isr.h"
|
|
|
|
|
|
|
|
/*===========================================================================*/
|
|
|
|
/* Driver local definitions. */
|
|
|
|
/*===========================================================================*/
|
|
|
|
|
|
|
|
/*===========================================================================*/
|
|
|
|
/* Driver exported variables. */
|
|
|
|
/*===========================================================================*/
|
|
|
|
|
|
|
|
/*===========================================================================*/
|
|
|
|
/* Driver local variables. */
|
|
|
|
/*===========================================================================*/
|
|
|
|
|
|
|
|
/*===========================================================================*/
|
|
|
|
/* Driver local functions. */
|
|
|
|
/*===========================================================================*/
|
|
|
|
|
|
|
|
/*===========================================================================*/
|
|
|
|
/* Driver interrupt handlers. */
|
|
|
|
/*===========================================================================*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief EXTI[0] interrupt handler.
|
|
|
|
*
|
|
|
|
* @isr
|
|
|
|
*/
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_HANDLER(Vector58) {
|
2015-07-28 11:44:32 +00:00
|
|
|
uint32_t pr;
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_PROLOGUE();
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2016-02-27 08:00:47 +00:00
|
|
|
pr = EXTI->PR;
|
|
|
|
pr &= EXTI->IMR & (1U << 0);
|
2015-07-28 11:44:32 +00:00
|
|
|
EXTI->PR = pr;
|
2016-02-14 10:10:29 +00:00
|
|
|
if (pr & (1U << 0))
|
2015-07-28 11:44:32 +00:00
|
|
|
EXTD1.config->channels[0].cb(&EXTD1, 0);
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_EPILOGUE();
|
2013-08-21 14:54:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief EXTI[1] interrupt handler.
|
|
|
|
*
|
|
|
|
* @isr
|
|
|
|
*/
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_HANDLER(Vector5C) {
|
2015-07-28 11:44:32 +00:00
|
|
|
uint32_t pr;
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_PROLOGUE();
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2016-02-27 08:00:47 +00:00
|
|
|
pr = EXTI->PR;
|
|
|
|
pr &= EXTI->IMR & (1U << 1);
|
2015-07-28 11:44:32 +00:00
|
|
|
EXTI->PR = pr;
|
2016-02-14 10:10:29 +00:00
|
|
|
if (pr & (1U << 1))
|
2015-07-28 11:44:32 +00:00
|
|
|
EXTD1.config->channels[1].cb(&EXTD1, 1);
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_EPILOGUE();
|
2013-08-21 14:54:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief EXTI[2] interrupt handler.
|
|
|
|
*
|
|
|
|
* @isr
|
|
|
|
*/
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_HANDLER(Vector60) {
|
2015-07-28 11:44:32 +00:00
|
|
|
uint32_t pr;
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_PROLOGUE();
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2016-02-27 08:00:47 +00:00
|
|
|
pr = EXTI->PR;
|
|
|
|
pr &= EXTI->IMR & (1U << 2);
|
2015-07-28 11:44:32 +00:00
|
|
|
EXTI->PR = pr;
|
2016-02-14 10:10:29 +00:00
|
|
|
if (pr & (1U << 2))
|
2015-07-28 11:44:32 +00:00
|
|
|
EXTD1.config->channels[2].cb(&EXTD1, 2);
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_EPILOGUE();
|
2013-08-21 14:54:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief EXTI[3] interrupt handler.
|
|
|
|
*
|
|
|
|
* @isr
|
|
|
|
*/
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_HANDLER(Vector64) {
|
2015-07-28 11:44:32 +00:00
|
|
|
uint32_t pr;
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_PROLOGUE();
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2016-02-27 08:00:47 +00:00
|
|
|
pr = EXTI->PR;
|
|
|
|
pr &= EXTI->IMR & (1U << 3);
|
2015-07-28 11:44:32 +00:00
|
|
|
EXTI->PR = pr;
|
2016-02-14 10:10:29 +00:00
|
|
|
if (pr & (1U << 3))
|
2015-07-28 11:44:32 +00:00
|
|
|
EXTD1.config->channels[3].cb(&EXTD1, 3);
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_EPILOGUE();
|
2013-08-21 14:54:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief EXTI[4] interrupt handler.
|
|
|
|
*
|
|
|
|
* @isr
|
|
|
|
*/
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_HANDLER(Vector68) {
|
2015-07-28 11:44:32 +00:00
|
|
|
uint32_t pr;
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_PROLOGUE();
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2016-02-27 08:00:47 +00:00
|
|
|
pr = EXTI->PR;
|
|
|
|
pr &= EXTI->IMR & (1U << 4);
|
2015-07-28 11:44:32 +00:00
|
|
|
EXTI->PR = pr;
|
2016-02-14 10:10:29 +00:00
|
|
|
if (pr & (1U << 4))
|
2015-07-28 11:44:32 +00:00
|
|
|
EXTD1.config->channels[4].cb(&EXTD1, 4);
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_EPILOGUE();
|
2013-08-21 14:54:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief EXTI[5]...EXTI[9] interrupt handler.
|
|
|
|
*
|
|
|
|
* @isr
|
|
|
|
*/
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_HANDLER(Vector9C) {
|
2013-08-21 14:54:22 +00:00
|
|
|
uint32_t pr;
|
|
|
|
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_PROLOGUE();
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2016-02-27 08:00:47 +00:00
|
|
|
pr = EXTI->PR;
|
|
|
|
pr &= EXTI->IMR & ((1U << 5) | (1U << 6) | (1U << 7) | (1U << 8) |
|
|
|
|
(1U << 9));
|
2013-08-21 14:54:22 +00:00
|
|
|
EXTI->PR = pr;
|
2016-02-14 10:10:29 +00:00
|
|
|
if (pr & (1U << 5))
|
2013-08-21 14:54:22 +00:00
|
|
|
EXTD1.config->channels[5].cb(&EXTD1, 5);
|
2016-02-14 10:10:29 +00:00
|
|
|
if (pr & (1U << 6))
|
2013-08-21 14:54:22 +00:00
|
|
|
EXTD1.config->channels[6].cb(&EXTD1, 6);
|
2016-02-14 10:10:29 +00:00
|
|
|
if (pr & (1U << 7))
|
2013-08-21 14:54:22 +00:00
|
|
|
EXTD1.config->channels[7].cb(&EXTD1, 7);
|
2016-02-14 10:10:29 +00:00
|
|
|
if (pr & (1U << 8))
|
2013-08-21 14:54:22 +00:00
|
|
|
EXTD1.config->channels[8].cb(&EXTD1, 8);
|
2016-02-14 10:10:29 +00:00
|
|
|
if (pr & (1U << 9))
|
2013-08-21 14:54:22 +00:00
|
|
|
EXTD1.config->channels[9].cb(&EXTD1, 9);
|
|
|
|
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_EPILOGUE();
|
2013-08-21 14:54:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief EXTI[10]...EXTI[15] interrupt handler.
|
|
|
|
*
|
|
|
|
* @isr
|
|
|
|
*/
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_HANDLER(VectorE0) {
|
2013-08-21 14:54:22 +00:00
|
|
|
uint32_t pr;
|
|
|
|
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_PROLOGUE();
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2016-02-27 08:00:47 +00:00
|
|
|
pr = EXTI->PR;
|
|
|
|
pr &= EXTI->IMR & ((1U << 10) | (1U << 11) | (1U << 12) | (1U << 13) |
|
|
|
|
(1U << 14) | (1U << 15));
|
2013-08-21 14:54:22 +00:00
|
|
|
EXTI->PR = pr;
|
2016-02-14 10:10:29 +00:00
|
|
|
if (pr & (1U << 10))
|
2013-08-21 14:54:22 +00:00
|
|
|
EXTD1.config->channels[10].cb(&EXTD1, 10);
|
2016-02-14 10:10:29 +00:00
|
|
|
if (pr & (1U << 11))
|
2013-08-21 14:54:22 +00:00
|
|
|
EXTD1.config->channels[11].cb(&EXTD1, 11);
|
2016-02-14 10:10:29 +00:00
|
|
|
if (pr & (1U << 12))
|
2013-08-21 14:54:22 +00:00
|
|
|
EXTD1.config->channels[12].cb(&EXTD1, 12);
|
2016-02-14 10:10:29 +00:00
|
|
|
if (pr & (1U << 13))
|
2013-08-21 14:54:22 +00:00
|
|
|
EXTD1.config->channels[13].cb(&EXTD1, 13);
|
2016-02-14 10:10:29 +00:00
|
|
|
if (pr & (1U << 14))
|
2013-08-21 14:54:22 +00:00
|
|
|
EXTD1.config->channels[14].cb(&EXTD1, 14);
|
2016-02-14 10:10:29 +00:00
|
|
|
if (pr & (1U << 15))
|
2013-08-21 14:54:22 +00:00
|
|
|
EXTD1.config->channels[15].cb(&EXTD1, 15);
|
|
|
|
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_EPILOGUE();
|
2013-08-21 14:54:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief EXTI[16] interrupt handler (PVD).
|
|
|
|
*
|
|
|
|
* @isr
|
|
|
|
*/
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_HANDLER(Vector44) {
|
2015-07-28 11:44:32 +00:00
|
|
|
uint32_t pr;
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_PROLOGUE();
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2016-02-27 08:00:47 +00:00
|
|
|
pr = EXTI->PR;
|
|
|
|
pr = EXTI->IMR & (1U << 16);
|
2015-07-28 11:44:32 +00:00
|
|
|
EXTI->PR = pr;
|
2016-02-14 10:10:29 +00:00
|
|
|
if (pr & (1U << 16))
|
2015-07-28 11:44:32 +00:00
|
|
|
EXTD1.config->channels[16].cb(&EXTD1, 16);
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_EPILOGUE();
|
2013-08-21 14:54:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2013-08-23 09:17:33 +00:00
|
|
|
* @brief EXTI[17] interrupt handler (RTC_ALARM).
|
2013-08-21 14:54:22 +00:00
|
|
|
*
|
|
|
|
* @isr
|
|
|
|
*/
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_HANDLER(VectorE4) {
|
2015-07-28 11:44:32 +00:00
|
|
|
uint32_t pr;
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_PROLOGUE();
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2016-02-27 08:00:47 +00:00
|
|
|
pr = EXTI->PR;
|
|
|
|
pr = EXTI->IMR & (1U << 17);
|
2015-07-28 11:44:32 +00:00
|
|
|
EXTI->PR = pr;
|
2016-02-14 10:10:29 +00:00
|
|
|
if (pr & (1U << 17))
|
2015-07-28 11:44:32 +00:00
|
|
|
EXTD1.config->channels[17].cb(&EXTD1, 17);
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_EPILOGUE();
|
2013-08-21 14:54:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief EXTI[18] interrupt handler (OTG_FS_WKUP).
|
|
|
|
*
|
|
|
|
* @isr
|
|
|
|
*/
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_HANDLER(VectorE8) {
|
2015-07-28 11:44:32 +00:00
|
|
|
uint32_t pr;
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_PROLOGUE();
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2016-02-27 08:00:47 +00:00
|
|
|
pr = EXTI->PR;
|
|
|
|
pr &= EXTI->IMR & (1U << 18);
|
2015-07-28 11:44:32 +00:00
|
|
|
EXTI->PR = pr;
|
2016-02-14 10:10:29 +00:00
|
|
|
if (pr & (1U << 18))
|
2015-07-28 11:44:32 +00:00
|
|
|
EXTD1.config->channels[18].cb(&EXTD1, 18);
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_EPILOGUE();
|
2013-08-21 14:54:22 +00:00
|
|
|
}
|
|
|
|
|
2015-07-28 11:44:32 +00:00
|
|
|
#if STM32_HAS_ETH || defined(__DOXYGEN__)
|
2013-08-21 14:54:22 +00:00
|
|
|
/**
|
|
|
|
* @brief EXTI[19] interrupt handler (ETH_WKUP).
|
|
|
|
*
|
|
|
|
* @isr
|
|
|
|
*/
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_HANDLER(Vector138) {
|
2015-07-28 11:44:32 +00:00
|
|
|
uint32_t pr;
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_PROLOGUE();
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2016-02-27 08:00:47 +00:00
|
|
|
pr = EXTI->PR;
|
|
|
|
pr &= EXTI->IMR & (1U << 19);
|
2015-07-28 11:44:32 +00:00
|
|
|
EXTI->PR = pr;
|
2016-02-14 10:10:29 +00:00
|
|
|
if (pr & (1U << 19))
|
2015-07-28 11:44:32 +00:00
|
|
|
EXTD1.config->channels[19].cb(&EXTD1, 19);
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_EPILOGUE();
|
2013-08-21 14:54:22 +00:00
|
|
|
}
|
2014-10-03 11:38:31 +00:00
|
|
|
#endif /* STM32_HAS_ETH */
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2015-07-28 11:44:32 +00:00
|
|
|
#if STM32_HAS_OTG2 || defined(__DOXYGEN__)
|
2013-08-21 14:54:22 +00:00
|
|
|
/**
|
|
|
|
* @brief EXTI[20] interrupt handler (OTG_HS_WKUP).
|
|
|
|
*
|
|
|
|
* @isr
|
|
|
|
*/
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_HANDLER(Vector170) {
|
2015-07-28 11:44:32 +00:00
|
|
|
uint32_t pr;
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_PROLOGUE();
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2016-02-27 08:00:47 +00:00
|
|
|
pr = EXTI->PR;
|
|
|
|
pr &= EXTI->IMR & (1U << 20);
|
2015-07-28 11:44:32 +00:00
|
|
|
EXTI->PR = pr;
|
2016-02-14 10:10:29 +00:00
|
|
|
if (pr & (1U << 20))
|
2015-07-28 11:44:32 +00:00
|
|
|
EXTD1.config->channels[20].cb(&EXTD1, 20);
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_EPILOGUE();
|
2013-08-21 14:54:22 +00:00
|
|
|
}
|
2014-10-03 11:38:31 +00:00
|
|
|
#endif /* STM32_HAS_OTG2 */
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2014-10-03 08:56:25 +00:00
|
|
|
#if !defined(STM32F401xx)
|
2013-08-21 14:54:22 +00:00
|
|
|
/**
|
|
|
|
* @brief EXTI[21] interrupt handler (TAMPER_STAMP).
|
|
|
|
*
|
|
|
|
* @isr
|
|
|
|
*/
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_HANDLER(Vector48) {
|
2015-07-28 11:44:32 +00:00
|
|
|
uint32_t pr;
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_PROLOGUE();
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2016-02-27 08:00:47 +00:00
|
|
|
pr = EXTI->PR;
|
|
|
|
pr &= EXTI->IMR & (1U << 21);
|
2015-07-28 11:44:32 +00:00
|
|
|
EXTI->PR = pr;
|
2016-02-14 10:10:29 +00:00
|
|
|
if (pr & (1U << 21))
|
2015-07-28 11:44:32 +00:00
|
|
|
EXTD1.config->channels[21].cb(&EXTD1, 21);
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_EPILOGUE();
|
2013-08-21 14:54:22 +00:00
|
|
|
}
|
2014-04-21 09:42:45 +00:00
|
|
|
#endif /* !defined(STM32F401xx) */
|
2013-08-21 14:54:22 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief EXTI[22] interrupt handler (RTC_WKUP).
|
|
|
|
*
|
|
|
|
* @isr
|
|
|
|
*/
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_HANDLER(Vector4C) {
|
2015-07-28 11:44:32 +00:00
|
|
|
uint32_t pr;
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_PROLOGUE();
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2016-02-27 08:00:47 +00:00
|
|
|
pr = EXTI->PR;
|
|
|
|
pr &= EXTI->IMR & (1U << 22);
|
2015-07-28 11:44:32 +00:00
|
|
|
EXTI->PR = pr;
|
2016-02-14 10:10:29 +00:00
|
|
|
if (pr & (1U << 22))
|
2015-07-28 11:44:32 +00:00
|
|
|
EXTD1.config->channels[22].cb(&EXTD1, 22);
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2013-08-23 09:17:33 +00:00
|
|
|
OSAL_IRQ_EPILOGUE();
|
2013-08-21 14:54:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*===========================================================================*/
|
|
|
|
/* Driver exported functions. */
|
|
|
|
/*===========================================================================*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Enables EXTI IRQ sources.
|
|
|
|
*
|
|
|
|
* @notapi
|
|
|
|
*/
|
|
|
|
void ext_lld_exti_irq_enable(void) {
|
|
|
|
|
2013-08-23 09:17:33 +00:00
|
|
|
nvicEnableVector(EXTI0_IRQn, STM32_EXT_EXTI0_IRQ_PRIORITY);
|
|
|
|
nvicEnableVector(EXTI1_IRQn, STM32_EXT_EXTI1_IRQ_PRIORITY);
|
|
|
|
nvicEnableVector(EXTI2_IRQn, STM32_EXT_EXTI2_IRQ_PRIORITY);
|
|
|
|
nvicEnableVector(EXTI3_IRQn, STM32_EXT_EXTI3_IRQ_PRIORITY);
|
|
|
|
nvicEnableVector(EXTI4_IRQn, STM32_EXT_EXTI4_IRQ_PRIORITY);
|
|
|
|
nvicEnableVector(EXTI9_5_IRQn, STM32_EXT_EXTI5_9_IRQ_PRIORITY);
|
|
|
|
nvicEnableVector(EXTI15_10_IRQn, STM32_EXT_EXTI10_15_IRQ_PRIORITY);
|
|
|
|
nvicEnableVector(PVD_IRQn, STM32_EXT_EXTI16_IRQ_PRIORITY);
|
|
|
|
nvicEnableVector(RTC_Alarm_IRQn, STM32_EXT_EXTI17_IRQ_PRIORITY);
|
|
|
|
nvicEnableVector(OTG_FS_WKUP_IRQn, STM32_EXT_EXTI18_IRQ_PRIORITY);
|
2014-10-03 11:38:31 +00:00
|
|
|
#if STM32_HAS_ETH
|
2014-07-09 17:49:15 +00:00
|
|
|
nvicEnableVector(ETH_WKUP_IRQn, STM32_EXT_EXTI19_IRQ_PRIORITY);
|
2014-10-03 11:38:31 +00:00
|
|
|
#endif
|
|
|
|
#if STM32_HAS_OTG2
|
2013-08-23 09:17:33 +00:00
|
|
|
nvicEnableVector(OTG_HS_WKUP_IRQn, STM32_EXT_EXTI20_IRQ_PRIORITY);
|
2014-10-03 11:38:31 +00:00
|
|
|
#endif
|
2014-10-03 08:56:25 +00:00
|
|
|
#if !defined(STM32F401xx)
|
2013-08-23 09:17:33 +00:00
|
|
|
nvicEnableVector(TAMP_STAMP_IRQn, STM32_EXT_EXTI21_IRQ_PRIORITY);
|
2014-04-21 09:41:11 +00:00
|
|
|
#endif /* !defined(STM32F401xx) */
|
2013-08-23 09:17:33 +00:00
|
|
|
nvicEnableVector(RTC_WKUP_IRQn, STM32_EXT_EXTI22_IRQ_PRIORITY);
|
2013-08-21 14:54:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Disables EXTI IRQ sources.
|
|
|
|
*
|
|
|
|
* @notapi
|
|
|
|
*/
|
|
|
|
void ext_lld_exti_irq_disable(void) {
|
|
|
|
|
|
|
|
nvicDisableVector(EXTI0_IRQn);
|
|
|
|
nvicDisableVector(EXTI1_IRQn);
|
|
|
|
nvicDisableVector(EXTI2_IRQn);
|
|
|
|
nvicDisableVector(EXTI3_IRQn);
|
|
|
|
nvicDisableVector(EXTI4_IRQn);
|
|
|
|
nvicDisableVector(EXTI9_5_IRQn);
|
|
|
|
nvicDisableVector(EXTI15_10_IRQn);
|
|
|
|
nvicDisableVector(PVD_IRQn);
|
|
|
|
nvicDisableVector(RTC_Alarm_IRQn);
|
|
|
|
nvicDisableVector(OTG_FS_WKUP_IRQn);
|
2014-10-03 11:38:31 +00:00
|
|
|
#if STM32_HAS_ETH
|
2014-07-09 17:49:15 +00:00
|
|
|
nvicDisableVector(ETH_WKUP_IRQn);
|
2014-10-03 11:38:31 +00:00
|
|
|
#endif
|
|
|
|
#if STM32_HAS_OTG2
|
2013-08-21 14:54:22 +00:00
|
|
|
nvicDisableVector(OTG_HS_WKUP_IRQn);
|
2014-10-03 11:38:31 +00:00
|
|
|
#endif
|
2014-10-03 08:56:25 +00:00
|
|
|
#if !defined(STM32F401xx)
|
2013-08-21 14:54:22 +00:00
|
|
|
nvicDisableVector(TAMP_STAMP_IRQn);
|
2014-04-21 09:41:11 +00:00
|
|
|
#endif /* !defined(STM32F401xx) */
|
2013-08-21 14:54:22 +00:00
|
|
|
nvicDisableVector(RTC_WKUP_IRQn);
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* HAL_USE_EXT */
|
|
|
|
|
|
|
|
/** @} */
|