commandlist.c

来自「优龙YLP270开发板 光盘自带的BIOS和实验例程源码 强烈推荐」· C语言 代码 · 共 308 行

C
308
字号
/******************************************************************************
**
**  COPYRIGHT (C) 2000, 2001 Intel Corporation.
**
**  This software as well as the software described in it is furnished under
**  license and may only be used or copied in accordance with the terms of the
**  license. The information in this file is furnished for informational use
**  only, is subject to change without notice, and should not be construed as
**  a commitment by Intel Corporation. Intel Corporation assumes no
**  responsibility or liability for any errors or inaccuracies that may appear
**  in this document or any software that may be provided in association with
**  this document.
**  Except as permitted by such license, no part of this document may be
**  reproduced, stored in a retrieval system, or transmitted in any form or by
**  any means without the express written consent of Intel Corporation.
**
**  FILENAME:       commandlist.c
**
**  PURPOSE:        This file contains the command lists arrays used for
**                  parsing menus and scripting.
**
**  LAST MODIFIED:  $Modtime: 9/04/03 1:42p $
******************************************************************************/

/*
*******************************************************************************
*   HEADER FILES
*******************************************************************************
*/
#include "systypes.h"
#include "xllp_defs.h"
#include "dm_perf.h"
#include "dm_errors.h"
#include "dm_test.h"
#include "commandlist.h"
#include "memory.h"
#include "XsIntCtrlApi.h"
#include "xsuart.h"
#include "xsffuart.h"
#include "xsbtuart.h"
#include "xsstuart.h"
#include "xllp_udc.h"
#include "xsudc.h"
#include "xsicp.h"
#include "xsssp.h"
#include "uarts.h"
#include "FlashAPI.h"
#include "intelFlashAPI.h"
#include "cardserviceAPI.h"
#include "xllp_ethernet.h"
#include "EthernetCntr.h"
#include "network.h"
#include "networkAPI.h"
#include "flashLoaderAPI.h"
#include "memoryLoaderAPI.h"
#include "USBClient.h"
#include "sir.h"
#include "fir.h"
#include "ssp.h"
#include "TstTouchscreen.h"
#include "TstMmc.h"
#include "TstAc97Api.h"
#include "xsost.h"
#include "XsLcdTest.h"
#include "dm_edit.h"
#include "DM_Debug.h"
#include "DM_DbgHistory.h"
#include "post.h"
#include "TstROS.h"
#include "TstMsl.h"
#include "MemoryStickTest.h"
#include "KeypadTest.h"
#include "XsUsbHostDrv.h"
#include "XsUsbHostAPI.h"
#include "USBHost.h"
#include "dvm.h"
#include "TST_I2cI2sAudio.h"
#include "LEDsAPI.h"
#include "BBUBoot.h"
#include "Usim_test.h"
#include "TST_I2cI2sAudio.h"
#include "UsbOTG.h"
#include "cotulla.h"


void runAll (void *arg, CHAR *paramP);

/*
*******************************************************************************
*   GLOBAL DEFINITIONS
*******************************************************************************
*/

DM_CommandListEntry_T PlatformCmdList[] =
{
    {"MEMEDIT.VIEW", DM_ViewMemory, 0, 0}, 
    {"MEMEDIT.HIGHER", DM_HigherMemory, 0, 0}, 
    {"MEMEDIT.LOWER", DM_LowerMemory, 0, 0}, 
    {"MEMEDIT.WRITE", DM_WriteMemory, 0, 0}, 
    {"MEMEDIT.LENGTH", DM_LengthMemory, 0, 0}, 
    {"MEMEDIT.FILL", DM_FillMemory, 0, 0}, 
    {"MEMEDIT.COPY", DM_CopyMemory, 0, 0},
    {"MEMEDIT.COMPARE", DM_CompareMemory, 0, 0},
    {"MEMEDIT.WIDTH", DM_WidthMemory, 0, 0}, 
    {"MEMEDIT.SEARCH", DM_SearchMemory, 0, 0}, 
    {"MEMEDIT.SEARCHHIGHER", DM_SearchHigherMemory, 0, 0}, 
    {"MEMEDIT.SEARCHLOWER", DM_SearchLowerMemory, 0, 0}, 
    {"MEMEDIT.SEARCHLENGTH", DM_SearchLength, 0, 0}, 

    {"DM.CONTROLWORDS.DISABLE.ALL",       DM_CwDisableAllControlWordBits,0, 0},
    {"DM.CONTROLWORDS.INCRCURSW",         DM_CwSelectNextBit,            0, 0},
    {"DM.CONTROLWORDS.DECRCURSW",         DM_CwSelectPrevBit,            0, 0},
    {"DM.CONTROLWORDS.SHOWBITNAMES",      DM_CwNameControlWordBits,      0, 0},
    {"DM.CONTROLWORDS.SHOWCURSW",         DM_CwDisplayCurrSwitchInfo,    0, 0},
    {"DM.CONTROLWORDS.DEBUGPRINT.SHOW",   DM_CwDebugPrintfCtrlShow,      0, 0},
    {"DM.CONTROLWORDS.WARNPRINT.SHOW",    DM_CwWarnPrintfCtrlShow,       0, 0},
    {"DM.CONTROLWORDS.ERRPRINT.SHOW",     DM_CwErrPrintfCtrlShow,        0, 0},
    {"DM.CONTROLWORDS.DEBUGPRINT.TOGGLE", DM_CwDebugPrintfCtrlToggle,    0, 0},
    {"DM.CONTROLWORDS.WARNPRINT.TOGGLE",  DM_CwWarnPrintfCtrlToggle,     0, 0},
    {"DM.CONTROLWORDS.ERRPRINT.TOGGLE",   DM_CwErrPrintfCtrlToggle,      0, 0},

    {"DM.DBGHISTORY.INCRCNTRL",     DM_DbgHistoryIncrementControl,  0, 0},
    {"DM.DBGHISTORY.DECRCNTRL",     DM_DbgHistoryDecrementControl,  0, 0},
    {"DM.DBGHISTORY.TOGGLECNTRL",   DM_DbgHistoryControlTogle,      0, 0},
    {"DM.DBGHISTORY.ALLCNTRL",      DM_DbgHistoryPrintAllControls,  0, 0},
    {"DM.DBGHISTORY.CLEARBUFFER",   DM_DbgClearHistory,             0, 0},
    {"DM.DBGHISTORY.DUMPBUFFER",    DM_DbgDumpHistory,              0, 0},
    {"DM.DBGHISTORY.TOGGLESELECT",  DM_DbgHistoryControlToggleSelected,  0, 0},

    {"FLASH.STATUS",     Flash_ShowStatus,    0, 0},
    {"FLASH.READTEST",   Flash_ReadTest,      0, 0},
    {"FLASH.WRITETEST",  Flash_WriteTest,     0, 0},
    {"FLASH.LOCKTEST",   Flash_LockTest,      0, 0},
    {"FLASH.POSTSTRATA", PostStrataFlashTest, 0, 0},
    {"FLASH.TRACE",      Flash_Trace,         0, 0},

    {"FLASHLOADER.PROGRAM",   FlashLoader_Flash,   0, 0},
    {"FLASHLOADER.VERIFY",    FlashLoader_Verify,  0, 0},
    {"FLASHLOADER.JUMPTO",    FlashLoader_JumpTo,  0, 0},
    {"FLASHLOADER.TRACE",     FlashLoader_Trace,   0, 0},

    {"ARP.TRACE",     ArpTraceEnable,     0, 0},
    {"DHCP.TRACE",    dhcp_traceEnable,   0, 0},
    {"ETHER.TRACE",   ether_traceEnable,  0, 0},
    {"ICMP.TRACE",    icmp_traceEnable,   0, 0},
    {"INET.TRACE",    inet_traceEnable,   0, 0},
    {"IP.TRACE",      ip_traceEnable,     0, 0},
    {"TFTP.TRACE",    tftp_traceEnable,   0, 0},
    {"UDP.TRACE",     udp_traceEnable,    0, 0},

    {"MEMORY.ADDRESS",      MemoryAddressLines, 0, 0},
    {"MEMORY.ONESUM",       MemoryOnesSum,      0, 0},
    {"MEMORY.NOTONESUM",    MemoryNotOnesSum,   0, 0},
    {"MEMORY.WALKING1",     MemoryWalking1,     0, 0},
    {"MEMORY.WALKING0",     MemoryWalking0,     0, 0},
    {"MEMORY.POST",         PostMemoryTest,     0, 0},
    {"MEMORY.DMAMEMTOMEM",  DmaMemToMemTest,    0, 0},

    {"MEMORY.PROGRAM",    MemoryLoader_Load,   0, 0},
    {"MEMORY.JUMPTO",     MemoryLoader_JumpTo,  0, 0},

    {"FFUART.DMAINTLOOP",   UartDmaInterruptTest,   &FFUart, 0},
    {"FFUART.DMALOOP",      UartDmaLoopTest,        &FFUart, 0},
    {"FFUART.POSTLOOPBACK", PostUartStaticLoopTest, &FFUart, 0},

    {"BTUART.DMAINTLOOP",   UartDmaInterruptTest,   &BTUart, 0},
    {"BTUART.DMALOOP",      UartDmaLoopTest,        &BTUart, 0},
    {"BTUART.POSTLOOPBACK", PostUartStaticLoopTest, &BTUart, 0},
    {"BTUART.RS232",        EnableTrvBTUART,        0,       0},

    {"STUART.DMALOOP",      UartDmaLoopTest,        &STUart, 0},
    {"STUART.DMAINTLOOP",   UartDmaInterruptTest,   &STUart, 0},
    {"STUART.POSTLOOPBACK", PostUartStaticLoopTest, &STUart, 0},
    {"STUART.SIRSEND",      SirSendTest,            &STUart, 0},
    {"STUART.SIRRECV",      SirRecvTest,            &STUart, 0},
    {"STUART.SIRLOOPBACK",  SirLoopbackTest,        &STUart, 0},

    {"IRDA.CONFIG",         IRDAEnableOperationMode,      0, 0},
                            
    {"ICP.POSTLOOPBACK",    PostIcpStaticLoopTest,     &FastInfraredCommPort, 0},

    {"SSP.POSTLOOPBACK",    PostSspStaticLoopTest,     &SspSerialPort, 0},
    {"SSP2.POSTLOOPBACK",   PostSspStaticLoopTest,     &SspSerialPort2, 0},
    {"SSP3.POSTLOOPBACK",   PostSspStaticLoopTest,     &SspSerialPort3, 0},
    {"SSP1.DMALOOP",        SspDmaLoopTest,            &SspSerialPort, 0},
    {"SSP2.DMALOOP",        SspDmaLoopTest,            &SspSerialPort2, 0},
    {"SSP3.DMALOOP",        SspDmaLoopTest,            &SspSerialPort3, 0},
    {"SSP1.DMAINTLOOP",     SspDmaInterruptTest,       &SspSerialPort, 0},
    {"SSP2.DMAINTLOOP",     SspDmaInterruptTest,       &SspSerialPort2, 0},
    {"SSP3.DMAINTLOOP",     SspDmaInterruptTest,       &SspSerialPort3, 0},
    {"SSP1.SETFRAMEFORMAT", SspSetFrameFormat,         &SspSerialPort, 0},
    {"SSP2.SETFRAMEFORMAT", SspSetFrameFormat,         &SspSerialPort2, 0},
    {"SSP3.SETFRAMEFORMAT", SspSetFrameFormat,         &SspSerialPort3, 0},
    {"SSP1.SETRXTHRESHOLD", SspSetRxThreshold,         &SspSerialPort, 0},
    {"SSP2.SETRXTHRESHOLD", SspSetRxThreshold,         &SspSerialPort2, 0},
    {"SSP3.SETTXTHRESHOLD", SspSetRxThreshold,         &SspSerialPort3, 0},
    {"SSP1.SETTXTHRESHOLD", SspSetTxThreshold,         &SspSerialPort, 0},
    {"SSP2.SETTXTHRESHOLD", SspSetTxThreshold,         &SspSerialPort2, 0},
    {"SSP3.SETTXTHRESHOLD", SspSetTxThreshold,         &SspSerialPort3, 0},
    {"SSP1.SETDMACHANNEL",  SspSetDmaChannel,          &SspSerialPort, 0},
    {"SSP2.SETDMACHANNEL",  SspSetDmaChannel,          &SspSerialPort2, 0},
    {"SSP3.SETDMACHANNEL",  SspSetDmaChannel,          &SspSerialPort3, 0},

    {"ETHERNET.POSTLOOPBACK",  PostLANControllerTest,         0, 0},
    {"ETHERNET.TRANSMIT",      EthernetTransmitTest,          0, 0},
    {"ETHERNET.REGISTERS",     EthernetDisplayRegistersTest,  0, 0},
    {"ETHERNET.SETMACADDRESS", EthernetSetMACAddressTest,     0, 0},
    {"ETHERNET.GETMACADDRESS", EthernetGetMACAddressTest,     0, 0},
    {"ETHERNET.POSTLOORXPINT", EthernetLoopbackReceiveInterruptTest,    0, 0},
    {"ETHERNET.SETMULTICAST",  EthernetMulticastTableTest,    0, 0},
    {"ETHERNET.SERVER",        EthernetServerTest,            0, 0},
    {"ETHERNET.LOOPBACK",      ETHERNET_LoopBackTest,         0, 0},
    {"ETHERNET.TRACELOG",      EthernetTraceLog,              0, 0},
    {"ETHERNET.ERRORLOG",      EthernetErrorLog,              0, 0},

    {"UDC.RECEIVE",         UsbClientReceiveTest,      &UsbDeviceController,   0},
    {"UDC.TRANSMIT",        UsbClientTransmitTest,     &UsbDeviceController,   0},
    {"UDC.START",           UsbClientEnumerateTest,    &UsbDeviceController,   0},

    {"USBOTG.DUMPREG",      UsbOTGDumpRegistersI2CTest,       0,   0},
    {"USBOTG.READ",         UsbOTGReadRegisterI2CTest,        0,   0},
    {"USBOTG.WRITE",        UsbOTGWriteRegisterI2CTest,       0,   0},
    {"USBOTG.TRACELOG",     UsbOTGEnableDebugMode,            0,   0},

    {"USB.ENUMERATE",       UsbHostEnumerateTest,      &UsbHost,   0},
    {"USB.TRACELOG",        UsbHostEnableDebugMode,    &UsbHost,   0},
    {"USB.STRUCTURES",       UsbHostDisplayStructures,  &UsbHost,   0},

    {"MMC.DETECTINT", KPostTstMmcDetectCard, 0, 0},
    {"MMC.WR", KPostMmcWR, 0, 0},
    
    {"TOUCH.AC97", KTstTouchscreen, 0, 0},
    {"TOUCH.SSP", KTstTouchscreenAd, 0, 0},

	{"DVM", KDvmTest, 0, 0},
	{"DVM.SETV", KDVMSetVolt, 0, 0},
	{"DVM.SETFV", KDVMSetVoltFreq, 0, 0},
	{"DVM.SETBUS", KDVMTFreqChange, 0, 0},

    {"LCD.PICTURE", KXsLcdPictureTest, 0, 0},
    
    {"CARDSERVICES.DISPLAYCIS", CardServices_DisplayCIS, 0, 0},
    {"CARDSERVICES.DUMPCIS",    CardServices_DumpCIS,    0, 0},
    {"CARDSERVICES.DUMPIO",     CardServices_DumpRegs,   0, 0},
    {"CARDSERVICES.ENUMERATE",  CardServices_Enumerate,  0, 0},
    {"CARDSERVICES.DISABLE",    CardServices_Disable,    0, 0},

    {"PCMCIA0", KTstPcmcia0, 0, 0},
    {"PCMCIA1", KTstPcmcia1, 0, 0},
    {"PCMCIA0.CD", KPostTstPcmciaDetectCard0, 0, 0},
    {"PCMCIA1.CD", KPostTstPcmciaDetectCard1, 0, 0},
    
    {"AC97.INIT", KPostAc97Init, 0, 0},
    {"AUDIO.AC97", KPostAc97Tone, 0, 0},
    {"AUDIO.AC97MIC", KPostAc97Mic, 0, 0},

    {"AUDIO.I2S", KI2sI2cAudioTest, 0, 0},

    {"ROS", ROS_Test, 0, 0},
    
    {"MSL.TRACELOG",        MslTraceLog, 0, 0},
    {"MSL.CONFIGURE",       MslConfigure, 0, 0},
    {"MSL.LOOPBACK",        MslLoopbackTest, 0, 0},
    {"MSL.MFGLOOPBACK",     MslMfgLoopbackTest, 0, 0},
    {"MSL.DMALOOPBACK",     MslDmaLoopbackTest, 0, 0},
    {"MSL.DMAINTLOOPBACK",  MslDmaInterruptLoopbackTest, 0, 0},

    {"HEXLED.RUN",          PostHexLEDsTestCmd,          0, 0},
    
    {"HEXSW.RUN",           PostHexSwitchesTestCmd,      0, 0},

    {"POST.VERSION",        POSTDisplayVersion,        0, 0},
    {"POST.RUNONCE",        POSTRunOnce,               0, 0},
    {"POST.RUNINTERACTIVE", POSTRunInteractive,        0, 0},
    {"POST.COMMANDPROMPT",  POSTCommandPrompt,         0, 0},
    {"POST.MENUS",          POSTMenus,                 0, 0},
    {"POST.ERRORLOG.DUMP",  XllpUtilityDumpErrors,     0, 0},
    {"POST.ERRORLOG.CLEAR", XllpUtilityClearErrors,    0, 0},
    {"POST.RUNINTERACT",    PostRunAllInteractiveTest, 0, 0},
    {"POST.RUNALL",         PostRunAll,                0, 0},

    {"MEMSTICK",      KPostMemoryStickTest,   0,        0},
    {"MEMSTICK.CD", 	  KPostTstMSDetectCard,   0,        0},
    
    {"KEYPAD",      KPostKeypadTest,   0,        0},    
    {"FASTTAP",      KPostFastTapTest,   0,        0},    

    {"BBU",    KPostBBU,   0,   0},   
    
    {"USIMB",                KPostUsimTestB,   0,        0},  // Rohde&Schwarz Blue  
    {"USIMW",                KPostUsimTestW,   0,        0},  //White  
    {"USIM.VOLT",           KPostUsimVoltTest,   0,        0},    
    {"USIM.CD",             KPostUsimCDTest,   0,        0},    
     
	{"SYSIO.BTUART",             KPostSetBtAsSysIo,   0,        0}, 
	{"SYSIO.FFUART",             KPostSetFfAsSysIo,   0,        0},   

	{"GETCLOCKS",             KXsGetClockRate,   0,        0},   

	  
    0
};

DM_CommandListEntry_T *GetPlatformCommandList(void)
{
    return PlatformCmdList;
}

⌨️ 快捷键说明

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