STM32 按键EXTI方式 使用ST3.0.0库
arm_IRQHandler ; RTC Alarm through EXTI Line
DCD USBWakeUp_IRQHandler ; USB Wakeup from suspend
DCD TIM8_BRK_IRQHandler ; TIM8 Break
DCD TIM8_UP_IRQHandler ; TIM8 Update
DCD TIM8_TRG_COM_IRQHandler ; TIM8 Trigger and Commutation
DCD TIM8_CC_IRQHandler ; TIM8 Capture Compare
DCD ADC3_IRQHandler ; ADC3
DCD FSMC_IRQHandler ; FSMC
DCD SDIO_IRQHandler ; SDIO
DCD TIM5_IRQHandler ; TIM5
DCD SPI3_IRQHandler ; SPI3
DCD UART4_IRQHandler ; UART4
DCD UART5_IRQHandler ; UART5
DCD TIM6_IRQHandler ; TIM6
DCD TIM7_IRQHandler ; TIM7
DCD DMA2_Channel1_IRQHandler ; DMA2 Channel1
DCD DMA2_Channel2_IRQHandler ; DMA2 Channel2
DCD DMA2_Channel3_IRQHandler ; DMA2 Channel3
DCD DMA2_Channel4_5_IRQHandler ; DMA2 Channel4 & Channel5
============================================================================
void GPIO_EXTILineConfig(uint8_t GPIO_PortSource, uint8_t GPIO_PinSource)
把IO引脚配置为 EXTI Line,把IO引脚作为EXTI中断线使用,是IO的第二功能。
GPIO_EXTILineConfig(GPIO_PortSourceGPIOB, GPIO_PinSource0); //选定PB0为中断源(中断线)
==============================================================================
获取中断线的状态
ITStatus EXTI_GetITStatus(uint32_t EXTI_Line)
例如:
if(EXTI_GetITStatus(EXTI_Line0) != RESET) //确保是否产生了EXTI Line中断,也可以不加这条if语句(本人的理解)
{
// LED1 取反
GPIO_WriteBit(GPIOC, GPIO_Pin_3,(BitAction)((1-GPIO_ReadOutputDataBit(GPIOC, GPIO_Pin_3))));
EXTI_ClearITPendingBit(EXTI_Line0); //清除中断标志位
}
============================================================================================
void EXTI_ClearITPendingBit(uint32_t EXTI_Line)
例如:
EXTI_ClearITPendingBit(EXTI_Line0); //清除中断标志位 Clears the EXTI line pending bits. 清EXTI Line0的中断标志位。
STM32按键EXTI方 相关文章:
- Windows CE 进程、线程和内存管理(11-09)
- RedHatLinux新手入门教程(5)(11-12)
- uClinux介绍(11-09)
- openwebmailV1.60安装教学(11-12)
- Linux嵌入式系统开发平台选型探讨(11-09)
- Windows CE 进程、线程和内存管理(二)(11-09)