main.c

来自「CPU的code banking技术实例: This Zip file c」· C语言 代码 · 共 31 行

C
31
字号
#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 + =
减小字号Ctrl + -
显示快捷键?