44bmon.c

来自「arm_ads-44B 程序原代码」· C语言 代码 · 共 74 行

C
74
字号
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "..\inc\option.h"
#include "..\inc\def.h"
#include "..\inc\44b.h"
#include "..\inc\44blib.h"
#include "..\inc\lcd.h"
#include "..\inc\cache.h"

void Main(void)
{	
	int i;
	
	rSYSCFG = SYSCFG_8KB;
	
    __rt_lib_init(); //for ADS 1.0
    
    Port_Init();

    Uart_Init(0,115200);
    
    /* init delay func */
    Delay(0);

	Uart_Select(1);
	    
    /*******************************/
    /*          Banner             */
    /*******************************/
	    
	Uart_Printf("\n\n44bMON Ver 1.00 for S3C44B0X 6,2002\n");
    Uart_Printf("MCLK=%dMHz,COM:115.2kbps,8Bit,NP,UART1\n",MCLK/1000000);
    Uart_Printf("E-mail:meterchen@hotmail.com\n\n");

    /*******************************/
    /*          Cache test         */
    /*******************************/
    if(Test_Cache())
		Uart_Printf("Cache Test:O.K.\n");
    else
		Uart_Printf("Cache Test:FAIL!!!\n");
#if 0	
	for(i=0; i<2; i++)
	{
		Led_Display(3);
		Delay(1000);
		Led_Display(0);
		Delay(1000);
	}
	
	Uart_Printf("Close Cache Now\n");
	rSYSCFG = 0;		//no cache and wb
	FlushCache();

	for(i=0; i<2; i++)
	{
		Led_Display(3);
		Delay(1000);
		Led_Display(0);
		Delay(1000);
	}
	
	Uart_Printf("Open Cache Now\n");
	rSYSCFG = SYSCFG_8KB;
#endif
	while(1)
	{
		Led_Display(3);
		Delay(1000);
		Led_Display(0);
		Delay(1000);
	}
}

⌨️ 快捷键说明

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