📄 main.c
字号:
#include "../inc/def.h"
#include "../inc/config.h"
#include "../inc/board.h"
#include "../inc/utils.h"
extern void DftEnvInit( void );
//extern U8 D12_Check( void ) ;
extern int SRAM_Test( int argc , char* argv[] ) ;
int Temp_Test( int argc , char* argv[] )
{
U16 m ;
while ( 1 )
{
IO0CLR = IO0CLR | ( 1 << 19 ) ; //P = 0
m = *( ( volatile U8 * ) ( 0x820000a0 ) ) ;
*( ( volatile U8 * ) ( 0x820000a0 ) ) = 0xaa ;
m = *( ( volatile U8 * ) ( 0x820000a4 ) ) ;
*( ( volatile U8 * ) ( 0x820000a4 ) ) = 0x55 ;
m = *( ( volatile U8 * ) ( 0x820000a2 ) ) ;
*( ( volatile U8 * ) ( 0x820000a2 ) ) = 0xa5 ;
IO0SET = IO0SET | ( 1 << 19 ) ; //P = 1
}
return 0 ;
}
/****************************************************************************
【功能说明】系统主函数
****************************************************************************/
int main( void )
{
BoardInitStart();
PortInit();
DftEnvInit();
Beep( 200 );
LedDisp( 1, 100 ); //LED来回闪烁显示
//SRAM_Test( 1, NULL ) ; //SRAM自测试
ShowBootInfo();
Lcd_YM12864_Init() ; //Temporary Test
#ifdef NOR_FLASH_SUPPORT
NorFlashInit() ;
NorFlashStatusRep() ;
#endif
#ifdef NAND_FLASH_SUPPORT
NandFlashInit();
NandFlashStatusRep();
#endif
#ifdef TFTP_DOWNLOAD_SUPPORT
eth_init();
arp_init();
#endif
RTC_Initial() ; //RTC initial
printf( "Build date : %s--%s\n" , __DATE__ , __TIME__ );
#ifdef CMD_SHELL_SUPPORT
ShellIn();
#else
while ( 1 )
{
LedDisp();
ERROR( "No Command Shell, Enter This Loop Forever...\n" );
}
#endif
return 0 ;
}
//***************************************************************************
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -