main.c
来自「E:2410-S V4.0 06.08.21UCOS V5.0Exp16 键盘及」· C语言 代码 · 共 33 行
C
33 行
#include "inc/macro.h"
#include "inc/KeyBoard.h"
#include <string.h>
#include <stdio.h>
#include "inc/Uart.h"
#include "inc/lcd.h"
#include "inc/reg2410.h"
#include "inc/iic.h"
#include "inc/uhal.h"
#include "inc/lib.h"
#pragma import(__use_no_semihosting_swi) // ensure no functions that use semihosting
int main(void)
{ U8 key;
ARMTargetInit(); // do target (uHAL based ARM system) initialisation //
Key_init();
while(1)
{key=GetKey();
Led_IIC_init();
hudelay(100);
IIC_Write(0x70, 0x0d, 0);
IIC_Write(0x70, 0x10, key);
hudelay(2000);
Key_init_restor();
hudelay(100);
}
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?