edma_main.c

来自「Freescale MCF5445evb 参考测试代码」· C语言 代码 · 共 77 行

C
77
字号
/* * \file    edma_main.c * \brief   Command line interface for eDMA validation tests * \version $Revision: 1.1 $ * \author  Michael Norman */#include "common.h"#include "uif.h"#include "edma_tests.h"#undef EDMA_CLI/********************************************************************//* * Setup user interface */void mainloop (void);void cmd_rd (int, char **);const char PROMPT[] = "eDMA> ";UIF_CMD UIF_CMDTAB[] ={    UIF_CMDS_ALL    {"rd",  0,0,0,cmd_rd,   "Register Disply",""},};const int UIF_NUM_CMD    = UIF_CMDTAB_SIZE;UIF_SETCMD UIF_SETCMDTAB[] = {"",0,0,NULL,""};const int UIF_NUM_SETCMD = 0;/********************************************************************/void main (void){#ifndef EDMA_CLI    printf("Running all XBS tests.\n");    edma_reg_dump();#else    	char ch;    printf("\n");    printf("**************************************************\n");    printf("*                                                *\n");    printf("*                  eDMA Utility                  *\n");    printf("*                                                *\n");    printf("**************************************************\n");    printf(HELPMSG);    printf("\n");    mainloop();#endif}/********************************************************************/voidmainloop (void){    /* Enable interrupts to the core */    mcf5xxx_irq_enable();    while (TRUE)    {        printf(PROMPT);        run_cmd();    }}/********************************************************************/voidcmd_rd (int argc, char **argv){    edma_reg_dump();}/********************************************************************/

⌨️ 快捷键说明

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