欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136
標(biāo)題:
STM32F103C8T6單片機(jī)鍵盤掃描測試程序
[打印本頁]
作者:
254413002
時間:
2021-6-27 09:52
標(biāo)題:
STM32F103C8T6單片機(jī)鍵盤掃描測試程序
#include "stm32f10x.h"
//#include "led.h"
#include "delay.h"
#include "key.h"
#include "sys.h"
//#include "beep.h"
#include "oled_iic.h"
#include "display.h"
//#include "24cxx.h"
//#include "myiic.h"
//#include "timer.h"
//#include "as608.h"
//#include "usart3.h"
//#include "motor.h"
#include "string.h"
#include "stdio.h"
int main(void)
{
RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO, ENABLE);
GPIO_PinRemapConfig(GPIO_Remap_SWJ_JTAGDisable, ENABLE);
vu8 key=0;
delay_init();
HZ= GB16_NUM();
OLED_Init();
KEY_Init();
char str[20];
OLED_Clear();
while(1)
{
key=KEY_Scan(0);
if(key!=0)
{
sprintf(str,"key:%d",key);
OLED_Clear();
OLED_ShowCH(0,2,(u8*)str);
delay_ms(1000);
OLED_Clear();
key=0;
}
else
{
OLED_ShowCH(0,2,"請按key");
}
}
}
復(fù)制代碼
代碼:
測試-鍵盤.7z
(197.24 KB, 下載次數(shù): 18)
2021-6-30 03:51 上傳
點擊文件名下載附件
下載積分: 黑幣 -5
歡迎光臨 (http://www.raoushi.com/bbs/)
Powered by Discuz! X3.1