📄 display.c
字号:
/**********************************************************
*
* Display demo
*
**********************************************************/
#include "global_function.h"
#include "display.h"
void Display_demo(void)
{
B8 Input;
printf("\n\n\r------------------ Display demo ------------------\n\r");
printf(": enter a digit number, others will be display as E\n\r");
printf(": Esc to return\n\r");
printf("\n\ryour input: ");
Input = Uart0_GetInput();
while(Input != 0x1b)
{
Uart0_SendByte(Input);
Uart0_SendByte(0x08); //backspace
switch(Input)
{
case '0': Input = getBCD(0);
break;
case '1': Input = getBCD(1);
break;
case '2': Input = getBCD(2);
break;
case '3': Input = getBCD(3);
break;
case '4': Input = getBCD(4);
break;
case '5': Input = getBCD(5);
break;
case '6': Input = getBCD(6);
break;
case '7': Input = getBCD(7);
break;
case '8': Input = getBCD(8);
break;
case '9': Input = getBCD(9);
break;
default: Input = getBCD('E');
}
mLEDSET = Input | Input << 8;
Input = Uart0_GetInput();
}
mLEDSET = 0; //clear display
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -