亚洲春色中文字幕久久久-三上亚,一吻二脱三床四吻胸,国产真实伦对白视频全集,在线毛片观看,精品成品入口黄网,国产毛aⅴ片久久久,亚洲AV色香蕉一区二区三区老师,萧皇后A级艳片,色情日本视频更新,99久久亚洲精品日本无码

標題: STM32F103C8T6單片機鍵盤掃描測試程序 [打印本頁]

作者: 254413002    時間: 2021-6-27 09:52
標題: STM32F103C8T6單片機鍵盤掃描測試程序
  1. #include "stm32f10x.h"
  2. //#include "led.h"
  3. #include "delay.h"
  4. #include "key.h"
  5. #include "sys.h"
  6. //#include "beep.h"
  7. #include "oled_iic.h"
  8. #include "display.h"
  9. //#include "24cxx.h"
  10. //#include "myiic.h"
  11. //#include "timer.h"
  12. //#include "as608.h"
  13. //#include "usart3.h"
  14. //#include "motor.h"
  15. #include "string.h"
  16. #include "stdio.h"

  17.       


  18. int main(void)
  19. {
  20.         RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO, ENABLE);
  21.         GPIO_PinRemapConfig(GPIO_Remap_SWJ_JTAGDisable, ENABLE);
  22.         vu8 key=0;
  23.         delay_init();
  24.         HZ= GB16_NUM();
  25.         OLED_Init();
  26.         KEY_Init();
  27.         char str[20];
  28.         OLED_Clear();
  29.   
  30.         while(1)
  31.         {
  32.                 key=KEY_Scan(0);
  33.                 if(key!=0)
  34.                 {
  35.                         sprintf(str,"key:%d",key);
  36.                         OLED_Clear();
  37.                         OLED_ShowCH(0,2,(u8*)str);
  38.                         delay_ms(1000);
  39.                         OLED_Clear();
  40.                         key=0;
  41.                 }
  42.                 else
  43.                 {
  44.                         OLED_ShowCH(0,2,"請按key");
  45.                 }
  46.         }
  47. }
復制代碼

代碼: 測試-鍵盤.7z (197.24 KB, 下載次數: 18)





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