fifo_uart_test.c

来自「UART RS232 IPCORE for sopc builder」· C语言 代码 · 共 32 行

C
32
字号
// File: hello_world.c
//
// Contents: Minimal program for Nios
//           system "nios_reference32"
//
//

#include "excalibur.h"


int main(void)
	{
	long x;
	long time;
	setbuf(stdout,0);  // turn off buffering for printf

	time = nr_timer_milliseconds();
	for(x=0;x<100;x++)
	{
         nr_uart_txstring("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890\n");
         nr_delay(3);
    }

	time = nr_timer_milliseconds();
	printf(" %d ",time);
	printf ("\n\nHello from Nios .\n\n");

return 1;
	}

// end of file

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?