132 lines
6.7 KiB
C
132 lines
6.7 KiB
C
|
/******************************************************************************************************************************************
|
|||
|
* <EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: SWM320_exti.c
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD>: SWM320<EFBFBD><EFBFBD>Ƭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ⲿ<EFBFBD>жϹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>֧<EFBFBD><EFBFBD>: http://www.synwit.com.cn/e/tool/gbook/?bid=1
|
|||
|
* ע<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
|||
|
* <EFBFBD>汾<EFBFBD><EFBFBD><EFBFBD><EFBFBD>: V1.1.0 2017<EFBFBD><EFBFBD>10<EFBFBD><EFBFBD>25<EFBFBD><EFBFBD>
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼:
|
|||
|
*
|
|||
|
*******************************************************************************************************************************************
|
|||
|
* @attention
|
|||
|
*
|
|||
|
* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION
|
|||
|
* REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, SYNWIT SHALL NOT BE HELD LIABLE
|
|||
|
* FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
|
|||
|
* OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONN-
|
|||
|
* -ECTION WITH THEIR PRODUCTS.
|
|||
|
*
|
|||
|
* COPYRIGHT 2012 Synwit Technology
|
|||
|
*******************************************************************************************************************************************/
|
|||
|
#include "SWM320.h"
|
|||
|
#include "SWM320_exti.h"
|
|||
|
|
|||
|
/******************************************************************************************************************************************
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: EXTI_Init()
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD>: ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ⲿ<EFBFBD>жϳ<EFBFBD>ʼ<EFBFBD><EFBFBD>
|
|||
|
* <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>: GPIO_TypeDef * GPIOx ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ⲿ<EFBFBD>жϵ<EFBFBD>GPIO<EFBFBD>˿ڣ<EFBFBD><EFBFBD><EFBFBD>Чֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>GPIOA<EFBFBD><EFBFBD>GPIOB<EFBFBD><EFBFBD>GPIOC<EFBFBD><EFBFBD>GPIOM<EFBFBD><EFBFBD>GPION<EFBFBD><EFBFBD>GPIOP
|
|||
|
* uint32_t n ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ⲿ<EFBFBD>жϵ<EFBFBD>GPIO<EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD><EFBFBD><EFBFBD>Чֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>PIN0<EFBFBD><EFBFBD>PIN1<EFBFBD><EFBFBD>PIN2<EFBFBD><EFBFBD>... ... PIN22<EFBFBD><EFBFBD>PIN23
|
|||
|
* uint32_t mode <EFBFBD><EFBFBD>Чֵ<EFBFBD><EFBFBD>EXTI_FALL_EDGE<EFBFBD><EFBFBD>EXTI_RISE_EDGE<EFBFBD><EFBFBD>EXTI_BOTH_EDGE<EFBFBD><EFBFBD>EXTI_LOW_LEVEL<EFBFBD><EFBFBD>EXTI_HIGH_LEVEL
|
|||
|
* <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>: <EFBFBD><EFBFBD>
|
|||
|
* ע<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <EFBFBD><EFBFBD><EFBFBD><EFBFBD>GPIOA<EFBFBD><EFBFBD>GPIOB<EFBFBD><EFBFBD>GPIOC<EFBFBD><EFBFBD>GPIOM<EFBFBD><EFBFBD>PIN0--7<EFBFBD><EFBFBD><EFBFBD>ż<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Խ<EFBFBD><EFBFBD><EFBFBD>NVIC<EFBFBD>е<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>жϣ<EFBFBD><EFBFBD><EFBFBD>GPIOA0_IRQn<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҳ<EFBFBD><EFBFBD><EFBFBD>Խ<EFBFBD><EFBFBD><EFBFBD>NVIC<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>жϣ<EFBFBD>GPIOA_IRQn<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD>Բ<EFBFBD><EFBFBD>ڴ˺<EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><EFBFBD><EFBFBD>NVIC_EnableIRQ()ʹ<EFBFBD><EFBFBD>NVIC<EFBFBD>жϣ<EFBFBD><EFBFBD>Ӷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ը<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>NVIC_EnableIRQ(GPIOA0_IRQn)<EFBFBD><EFBFBD>NVIC_EnableIRQ(GPIOA_IRQn)
|
|||
|
******************************************************************************************************************************************/
|
|||
|
void EXTI_Init(GPIO_TypeDef *GPIOx, uint32_t n, uint32_t mode)
|
|||
|
{
|
|||
|
EXTI_Close(GPIOx, n); //<2F><><EFBFBD>ùؼ<C3B9><D8BC>Ĵ<EFBFBD><C4B4><EFBFBD>ǰ<EFBFBD>ȹر<C8B9>
|
|||
|
|
|||
|
if (mode & 0x10)
|
|||
|
{
|
|||
|
GPIOx->INTLVLTRG |= (0x01 << n); //<2F><>ƽ<EFBFBD><C6BD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
if (mode & 0x01)
|
|||
|
GPIOx->INTRISEEN |= (0x01 << n); //<2F>ߵ<EFBFBD>ƽ<EFBFBD><C6BD><EFBFBD><EFBFBD>
|
|||
|
else
|
|||
|
GPIOx->INTRISEEN &= ~(0x01 << n); //<2F>͵<EFBFBD>ƽ<EFBFBD><C6BD><EFBFBD><EFBFBD>
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
GPIOx->INTLVLTRG &= ~(0x01 << n); //<2F><><EFBFBD>ش<EFBFBD><D8B4><EFBFBD>
|
|||
|
|
|||
|
if (mode & 0x02)
|
|||
|
{
|
|||
|
GPIOx->INTBE |= (0x01 << n); //˫<><CBAB><EFBFBD>ش<EFBFBD><D8B4><EFBFBD>
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
GPIOx->INTBE &= ~(0x01 << n); //<2F><><EFBFBD><EFBFBD><EFBFBD>ش<EFBFBD><D8B4><EFBFBD>
|
|||
|
|
|||
|
if (mode & 0x01)
|
|||
|
GPIOx->INTRISEEN |= (0x01 << n); //<2F><><EFBFBD><EFBFBD><EFBFBD>ش<EFBFBD><D8B4><EFBFBD>
|
|||
|
else
|
|||
|
GPIOx->INTRISEEN &= ~(0x01 << n); //<2F>½<EFBFBD><C2BD>ش<EFBFBD><D8B4><EFBFBD>
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
GPIOx->INTCLR = (1 << n); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊģʽ<C4A3><CABD><EFBFBD>ÿ<EFBFBD><C3BF>ܲ<EFBFBD><DCB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD>
|
|||
|
}
|
|||
|
|
|||
|
/******************************************************************************************************************************************
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: EXTI_Open()
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD>: ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ⲿ<EFBFBD>жϴ<EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD>ܣ<EFBFBD>
|
|||
|
* <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>: GPIO_TypeDef * GPIOx ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ⲿ<EFBFBD>жϵ<EFBFBD>GPIO<EFBFBD>˿ڣ<EFBFBD><EFBFBD><EFBFBD>Чֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>GPIOA<EFBFBD><EFBFBD>GPIOB<EFBFBD><EFBFBD>GPIOC<EFBFBD><EFBFBD>GPIOM<EFBFBD><EFBFBD>GPION<EFBFBD><EFBFBD>GPIOP
|
|||
|
* uint32_t n ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ⲿ<EFBFBD>жϵ<EFBFBD>GPIO<EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD><EFBFBD><EFBFBD>Чֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>PIN0<EFBFBD><EFBFBD>PIN1<EFBFBD><EFBFBD>PIN2<EFBFBD><EFBFBD>... ... PIN22<EFBFBD><EFBFBD>PIN23
|
|||
|
* <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>: <EFBFBD><EFBFBD>
|
|||
|
* ע<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <EFBFBD><EFBFBD>
|
|||
|
******************************************************************************************************************************************/
|
|||
|
void EXTI_Open(GPIO_TypeDef *GPIOx, uint32_t n)
|
|||
|
{
|
|||
|
GPIOx->INTEN |= (0x01 << n);
|
|||
|
}
|
|||
|
|
|||
|
/******************************************************************************************************************************************
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: EXTI_Close()
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD>: ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ⲿ<EFBFBD>жϹرգ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܣ<EFBFBD>
|
|||
|
* <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>: GPIO_TypeDef * GPIOx ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ⲿ<EFBFBD>жϵ<EFBFBD>GPIO<EFBFBD>˿ڣ<EFBFBD><EFBFBD><EFBFBD>Чֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>GPIOA<EFBFBD><EFBFBD>GPIOB<EFBFBD><EFBFBD>GPIOC<EFBFBD><EFBFBD>GPIOM<EFBFBD><EFBFBD>GPION<EFBFBD><EFBFBD>GPIOP
|
|||
|
* uint32_t n ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ⲿ<EFBFBD>жϵ<EFBFBD>GPIO<EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD><EFBFBD><EFBFBD>Чֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>PIN0<EFBFBD><EFBFBD>PIN1<EFBFBD><EFBFBD>PIN2<EFBFBD><EFBFBD>... ... PIN22<EFBFBD><EFBFBD>PIN23
|
|||
|
* <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>: <EFBFBD><EFBFBD>
|
|||
|
* ע<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <EFBFBD><EFBFBD>
|
|||
|
******************************************************************************************************************************************/
|
|||
|
void EXTI_Close(GPIO_TypeDef *GPIOx, uint32_t n)
|
|||
|
{
|
|||
|
GPIOx->INTEN &= ~(0x01 << n);
|
|||
|
}
|
|||
|
|
|||
|
/******************************************************************************************************************************************
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: EXTI_State()
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD>: ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD>
|
|||
|
* <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>: GPIO_TypeDef * GPIOx ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ⲿ<EFBFBD>жϵ<EFBFBD>GPIO<EFBFBD>˿ڣ<EFBFBD><EFBFBD><EFBFBD>Чֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>GPIOA<EFBFBD><EFBFBD>GPIOB<EFBFBD><EFBFBD>GPIOC<EFBFBD><EFBFBD>GPIOM<EFBFBD><EFBFBD>GPION<EFBFBD><EFBFBD>GPIOP
|
|||
|
* uint32_t n ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ⲿ<EFBFBD>жϵ<EFBFBD>GPIO<EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD><EFBFBD><EFBFBD>Чֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>PIN0<EFBFBD><EFBFBD>PIN1<EFBFBD><EFBFBD>PIN2<EFBFBD><EFBFBD>... ... PIN22<EFBFBD><EFBFBD>PIN23
|
|||
|
* <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>: uint32_t 1 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD> 0 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>δ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD>
|
|||
|
* ע<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <EFBFBD><EFBFBD>
|
|||
|
******************************************************************************************************************************************/
|
|||
|
uint32_t EXTI_State(GPIO_TypeDef *GPIOx, uint32_t n)
|
|||
|
{
|
|||
|
return (GPIOx->INTSTAT >> n) & 0x01;
|
|||
|
}
|
|||
|
|
|||
|
/******************************************************************************************************************************************
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: EXTI_RawState()
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD>: ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<EFBFBD><EFBFBD><EFBFBD>жϴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>жϹر<EFBFBD>ʱ<EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ô˺<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Բ<EFBFBD>ѯ<EFBFBD>ķ<EFBFBD>ʽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<EFBFBD><EFBFBD><EFBFBD>жϴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
* <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>: GPIO_TypeDef * GPIOx ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ⲿ<EFBFBD>жϵ<EFBFBD>GPIO<EFBFBD>˿ڣ<EFBFBD><EFBFBD><EFBFBD>Чֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>GPIOA<EFBFBD><EFBFBD>GPIOB<EFBFBD><EFBFBD>GPIOC<EFBFBD><EFBFBD>GPIOM<EFBFBD><EFBFBD>GPION<EFBFBD><EFBFBD>GPIOP
|
|||
|
* uint32_t n ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ⲿ<EFBFBD>жϵ<EFBFBD>GPIO<EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD><EFBFBD><EFBFBD>Чֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>PIN0<EFBFBD><EFBFBD>PIN1<EFBFBD><EFBFBD>PIN2<EFBFBD><EFBFBD>... ... PIN22<EFBFBD><EFBFBD>PIN23
|
|||
|
* <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>: uint32_t 1 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<EFBFBD><EFBFBD><EFBFBD>жϴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>δ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<EFBFBD><EFBFBD><EFBFBD>жϴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
* ע<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <EFBFBD><EFBFBD>
|
|||
|
******************************************************************************************************************************************/
|
|||
|
uint32_t EXTI_RawState(GPIO_TypeDef *GPIOx, uint32_t n)
|
|||
|
{
|
|||
|
return (GPIOx->INTRAWSTAT >> 1) & 0x01;
|
|||
|
}
|
|||
|
|
|||
|
/******************************************************************************************************************************************
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: EXTI_Clear()
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD>: ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ⲿ<EFBFBD>ж<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>жϱ<EFBFBD>־<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ٴν<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>жϣ<EFBFBD>
|
|||
|
* <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>: GPIO_TypeDef * GPIOx ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ⲿ<EFBFBD>жϵ<EFBFBD>GPIO<EFBFBD>˿ڣ<EFBFBD><EFBFBD><EFBFBD>Чֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>GPIOA<EFBFBD><EFBFBD>GPIOB<EFBFBD><EFBFBD>GPIOC<EFBFBD><EFBFBD>GPIOM<EFBFBD><EFBFBD>GPION<EFBFBD><EFBFBD>GPIOP
|
|||
|
* uint32_t n ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ⲿ<EFBFBD>жϵ<EFBFBD>GPIO<EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD><EFBFBD><EFBFBD>Чֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>PIN0<EFBFBD><EFBFBD>PIN1<EFBFBD><EFBFBD>PIN2<EFBFBD><EFBFBD>... ... PIN22<EFBFBD><EFBFBD>PIN23
|
|||
|
* <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>: <EFBFBD><EFBFBD>
|
|||
|
* ע<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: ֻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ش<EFBFBD><EFBFBD><EFBFBD><EFBFBD>жϵı<EFBFBD>־<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>жϵı<EFBFBD>־<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ŵ<EFBFBD>ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>жϴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӳ<EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
******************************************************************************************************************************************/
|
|||
|
void EXTI_Clear(GPIO_TypeDef *GPIOx, uint32_t n)
|
|||
|
{
|
|||
|
GPIOx->INTCLR = (0x01 << n);
|
|||
|
}
|