예제 #1
0
/*******************************************************************************
* Function Name  : cmdHelpInit
* Description    : Init help command
* Input          : None.
* Output         : None.
* Return         : None.
*******************************************************************************/
void cmdHelpInit(void)
{
  cmdHelp.cmd      = "help";
  cmdHelp.phelp    = "Provides help for commands. Try `help <command>'";
  cmdHelp.phandler = cmdHelpDisp;
  cmdRegister(&cmdHelp);
}
예제 #2
0
/*******************************************************************************
* Function Name  : cmdBasicInit
* Description    : Initialize the base command structure.
* Input          : None.
* Output         : None.
* Return         : None.
*******************************************************************************/
void cmdBasicInit(void)
{
  cmd_t *pcmdArray = basic_cmd_array;

  while(pcmdArray->cmd != NULL)
  {
    cmdRegister(pcmdArray);
    pcmdArray += 1;
  }
}
예제 #3
0
/* --------------------------------------------------- */
void monitor::Init( void )
{
   #if 0
   /* Init command list with first command */
   sprintf( cmdHead.cmdS, "help" );
   cmdHead.func  = &help;
   cmdHead.xhelp = NULL;
   cmdHead.next  = NULL;

   /* Register some functions */
   if( cmdRegister( "mm",   &mm,   &mm_xhelp ) == -1 )
      printf( "error: failed to register <mm> cmd" );

   if( cmdRegister( "md",   &md,   &md_xhelp ) == -1 )
      printf( "error: failed to register <md> cmd" );

   /* Set first prompt */
   updatePrompt();
#endif
}