main_for_goat.c
来自「CODE for embedded C ,hand coding version」· C语言 代码 · 共 30 行
C
30 行
/*--------------------------------------------------------------*-
Main.C (v1.00)
Author:06_Digital_Media
All Right Reserved
------------------------------------------------------------------
A 'Switch count' Program for the 8051
-*---------------------------------------------------------------*/
#include "Main.H"
#include "Port.H"
#include "Switch_wait.H"
#include "Display_count.H"
/*---------------------------------------------------------------*/
void main(void){
tByte Switch_presses = 0;
//Init functions
SWITCH_Init();
DISPLAY_COUNT_Init();
while(1){
if(SWITCH_Get_Input(30)==SWITCH_PRESSED){
Switch_presses++ ;
}
DISPLAY_COUNT_Update(Switch_presses);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?