標(biāo)題: STM32F103ZET6外部中斷方式觸發(fā)的按鍵 [打印本頁]

作者: 514562    時間: 2023-11-25 22:17
標(biāo)題: STM32F103ZET6外部中斷方式觸發(fā)的按鍵
第一次分享代碼,不足之處請多包涵
STM32F103ZET6
普中STM32-PZ6806L開發(fā)板

  1. #include "stm32f10x.h" // Device header
  2. #include "Delay.h"
  3. #include "LED.h"
  4. #include "Key_EXTI.h"
  5. int main(void)
  6. {
  7.         LED_Init();
  8.         NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
  9.         Key_EXTI_Init();

  10.         while (1)
  11.         {
  12.                 LED_ON(D1);
  13.                 Delay_ms(500);
  14.                 LED_OFF(D1);
  15.                 Delay_ms(500);
  16.         }
  17. }
復(fù)制代碼


原理圖: 無
仿真: 無
代碼: 外部中斷方式觸發(fā)的按鍵.7z (179.09 KB, 下載次數(shù): 1)





歡迎光臨 (http://www.torrancerestoration.com/bbs/) Powered by Discuz! X3.1