main.c

来自「SAM9261的串口RS232程序」· C语言 代码 · 共 46 行

C
46
字号
//*----------------------------------------------------------------------------
//*         ATMEL Microcontroller Software Support  -  ROUSSET  -
//*----------------------------------------------------------------------------
//* The software is delivered "AS IS" without warranty or condition of any
//* kind, either express, implied or statutory. This includes without
//* limitation any warranty or condition with respect to merchantability or
//* fitness for any particular purpose, or against the infringements of
//* intellectual property rights of others.
//*----------------------------------------------------------------------------
//* File Name           : main.c
//* Object              :   main application written in C
//* Creation            :  GGi
//*----------------------------------------------------------------------------

 #include "main.h"
 #include "AT91SAM9261.h"
#include "lib_AT91SAM9261.h"
//*--------------------------------------------------------------------------------------
//* Function Name       : Main
//* Object              : Software entry point
//* Input Parameters    : none.
//* Output Parameters   : none.
//*--------------------------------------------------------------------------------------
int main()
{
      unsigned int tick;

	AT91F_DBGU_Printk("\r\n######################################\r\n");
	AT91F_DBGU_Printk("#   Basic COM  TEST for SAM9261#   \r\n");
	AT91F_DBGU_Printk("######################################\r\n");
	AT91F_DBGU_Printk("#   This application print a '*' each second  #\r\n");
	AT91F_DBGU_Printk("######################################\r\n");

	

	tick = *(AT91C_RTTC_RTVR);
	while (1) {
		AT91F_DBGU_Printk("\r\n*******************\r\n");
		while (tick == *(AT91C_RTTC_RTVR));
		tick = *(AT91C_RTTC_RTVR);
	}
	
	

}

⌨️ 快捷键说明

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