main.c

来自「针对三星的44B0的外围基本接口实验源代码」· C语言 代码 · 共 59 行

C
59
字号
/*********************************************************************************************
* File:	main.c
* Author:	embest
* Desc:	c main entry
* History:	
*********************************************************************************************/
#include "rw_ram.h"
#include "44b.h"
#include "44blib.h"
/*------------------------------------------------------------------------------------------*/
/*                                     function declare                                     */
/*------------------------------------------------------------------------------------------*/
extern void s_ram_test(void);
void sys_init(void)	;
void mem_test(void);
int main(void);
extern void c_ram_test(void) ;
/*********************************************************************************************
* name:		main
* func:		c code entry
* para:		none
* ret:		none
* modify:
* comment:		
*********************************************************************************************/
int main(void)
{
    sys_init();        /* Initial 44B0X's Interrupt,Port and UART */

	// user interface 
	uart_printf("\n\r Embest Arm EduKit III Evaluation Board");
	uart_printf("\n\r Memory Read/Write Access Test Example\n");

	mem_test();
//    test_cache();
    while(1);
}                                              
                                               
/*********************************************************************************************
* name:		mem_test
* func:		using assemble and c language access memory
* para:		none
* ret:		none
* modify:
* comment:		
*********************************************************************************************/
void mem_test(void)
{
    uart_printf(" Memory read  base Address : 0x%x\n",RW_BASE); 
    uart_printf(" Memory write base Address : 0x%x\n",RW_TARGET); 
    uart_printf("\n Memory Read/Write (ASM code,%dBytes) Test. \n",RW_NUM); 
    s_ram_test();

    uart_printf("\n Memory Read/Write (C code,%dBytes) Test. \n",RW_NUM); 
    c_ram_test();
    
    uart_printf(" Memory Test Success! \n"); 
}

⌨️ 快捷键说明

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