📄 main.c
字号:
/*************************************************************************/
/* */
/* FILE NAME VERSION */
/* */
/* diag.c KS32C5000, KS32C50100 : version 1.0 */
/* */
/* COMPONENT */
/* */
/* */
/* DESCRIPTION */
/* */
/* Dignostic Program to evaluate SNDS100 board */
/* */
/* AUTHOR */
/* */
/* */
/* DATA STRUCTURES */
/* */
/* */
/* FUNCTIONS */
/* */
/* SNDS board initializing routine */
/* */
/* DEPENDENCIES */
/* */
/* */
/* HISTORY */
/* */
/*************************************************************************/
#include <stdio.h>
#include <ctype.h>
#include "std.h"
#include "snds.h"
#include "diag.h"
//#include "memory.h"
//#include "flash.h"
//#include "down.h"
//#include "pollio.h"
#include "uart.h"
#include "isr.h"
#include "lcd.h"
#include "dma.h"
#include "iic.h"
#include "timer.h"
#include "system.h"
#include "mac.h"
#include "hdlc100.h"
#include "kslib.h"
#include "dhry.h"
#include "sysconf.h"
#include "iop.h"
#include "ping.h"
// C Program Entry Point
void C_Entry(void)
{
InitSnds() ;
web_test();
while(1){
ReceivePacket();
}
}
/*
* Function : InitSnds
* Description : Initialize for Command Line Interface
*/
void InitSnds(void)
{
IOPMOD |= 0x30000;//点亮LED
IOPDATA = 0x30000;//0x0 ;
InitInterrupt() ;
UARTTXH1 = NULL ;
UARTTXH0 = NULL ;
UART_Initialize(); /* Initialize UART channel 0,1 */
Print("UART initialized.\n");
LanInitialize() ;
Print("LAN initialized.\n");
// HdlcInitialize();
/* Timer0 used for real time clock for this SNDS */
tm_init(TIMER_DEV0,(ONE_SECOND/TICKS_PER_SECOND));
TimerStart(TIMER_DEV0);
IOPDATA = 0xf ;
Enable_Int(nGLOBAL_INT);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -