📄 main.c
字号:
#include "bank.h"
#include "proto.h"
// This project consists of 3 files
// main.c, countup.c, and countdown.c
// main.c begins by setting the LEDs on the
// demo board to "00" and then calls countup().
// countup() then makes the LEDs count "11", "22", "33"
// and then returns to main().
// Next, main() calls countdown() which makes the LEDs
// count down "22", "11" and then returns to main()
// and the whole process starts over again
void main () {
int i = 0;
bank_INIT ();
while (1) {
led = 0x00; // Change LED to 00
delay (); // Display the value for a few seconds
led = 0x44;
countup (); // Call function countup()
countdown (); // Call function countdown()
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -