当前位置: 首页>>代码示例>>C++>>正文


C++ CLS1_SendHelpStr函数代码示例

本文整理汇总了C++中CLS1_SendHelpStr函数的典型用法代码示例。如果您正苦于以下问题:C++ CLS1_SendHelpStr函数的具体用法?C++ CLS1_SendHelpStr怎么用?C++ CLS1_SendHelpStr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了CLS1_SendHelpStr函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: BLEUART_CMDMODE_ParseCommand

uint8_t BLEUART_CMDMODE_ParseCommand(const unsigned char *cmd, bool *handled, const CLS1_StdIOType *io) {
  uint8_t res = ERR_OK;

  if (UTIL1_strcmp((char*)cmd, CLS1_CMD_HELP)==0 || UTIL1_strcmp((char*)cmd, "uart help")==0) {
    CLS1_SendHelpStr((unsigned char*)"uart", (const unsigned char*)"Group of Adafruit BLE commands\r\n", io->stdOut);
    CLS1_SendHelpStr((unsigned char*)"  help|status", (const unsigned char*)"Print help or status information\r\n", io->stdOut);
    CLS1_SendHelpStr((unsigned char*)"  enable", (unsigned char*)"Enable BLE UART\r\n", io->stdOut);
    CLS1_SendHelpStr((unsigned char*)"  disable", (unsigned char*)"Disable BLE UART\r\n", io->stdOut);
    CLS1_SendHelpStr((unsigned char*)"  tx <string>", (unsigned char*)"Send string\r\n", io->stdOut);
    *handled = TRUE;
    return ERR_OK;
  } else if ((UTIL1_strcmp((char*)cmd, CLS1_CMD_STATUS)==0) || (UTIL1_strcmp((char*)cmd, "uart status")==0)) {
    *handled = TRUE;
    return PrintStatus(io);
  } else if (UTIL1_strcmp((char*)cmd, "uart enable")==0) {
    isEnabled = TRUE;
    *handled = TRUE;
  } else if (UTIL1_strcmp((char*)cmd, "uart disable")==0) {
    isEnabled = FALSE;
    *handled = TRUE;
  } else if (UTIL1_strncmp((char*)cmd, "uart tx ", sizeof("uart tx ") - 1) == 0) {
    *handled = TRUE;
    taskENTER_CRITICAL();
    UTIL1_strcpy(txBuffer, sizeof(txBuffer), cmd+sizeof("uart tx ")-1);
    UTIL1_strcat(txBuffer, sizeof(txBuffer), "\\n\n"); /* add newline */
    taskEXIT_CRITICAL();
  }
  return res; /* no error */
}
开发者ID:mbangtri,项目名称:mcuoneclipse,代码行数:29,代码来源:bleuart_cmdmode.c

示例2: MM_ParseCommand

uint8_t MM_ParseCommand(const unsigned char *cmd, bool *handled, const CLS1_StdIOType *io) {
  const uint8_t *p;
  uint8_t res;
  int32_t tmp;

  if (UTIL1_strcmp((char*)cmd, CLS1_CMD_HELP)==0 || UTIL1_strcmp((char*)cmd, "midi help")==0) {
     CLS1_SendHelpStr((unsigned char*)"midi", (const unsigned char*)"Group of midi commands\r\n", io->stdOut);
     CLS1_SendHelpStr((unsigned char*)"  help|status", (unsigned char*)"Print help or status information\r\n", io->stdOut);
     CLS1_SendHelpStr((unsigned char*)"  play <number>", (const unsigned char*)"Play midi song (0, 1)\r\n", io->stdOut);
     *handled = TRUE;
     return ERR_OK;
   } else if ((UTIL1_strcmp((char*)cmd, CLS1_CMD_STATUS)==0) || (UTIL1_strcmp((char*)cmd, "midi status")==0)) {
     *handled = TRUE;
     return PrintStatus(io);
   } else if (UTIL1_strncmp((char*)cmd, "midi play", sizeof("midi play")-1)==0) {
     p = cmd+sizeof("midi play")-1;
     res = UTIL1_xatoi(&p, &tmp);
     if (res==ERR_OK && tmp>=0) {
       *handled = TRUE;
       if (tmp==0) {
         MM_Play();
       } else if (tmp==1) {
         MM_PlayPirate();
       }
     }
     return res;
   }
  return ERR_OK;
}
开发者ID:AdarshJayakumar,项目名称:mcuoneclipse,代码行数:29,代码来源:MidiMusic.c

示例3: RADIO_PrintHelp

static void RADIO_PrintHelp(const CLS1_StdIOType *io) {
  CLS1_SendHelpStr((unsigned char*)"radio", (unsigned char*)"Group of radio commands\r\n", io->stdOut);
  CLS1_SendHelpStr((unsigned char*)"  help|status", (unsigned char*)"Shows radio help or status\r\n", io->stdOut);
  CLS1_SendHelpStr((unsigned char*)"  channel <number>", (unsigned char*)"Switches to the given channel. Channel must be in the range 0..127\r\n", io->stdOut);
  CLS1_SendHelpStr((unsigned char*)"  power <number>", (unsigned char*)"Changes output power to 0, -10, -12, -18\r\n", io->stdOut);
  CLS1_SendHelpStr((unsigned char*)"  sniff on|off", (unsigned char*)"Turns sniffing on or off\r\n", io->stdOut);
}
开发者ID:210221030,项目名称:mcuoneclipse,代码行数:7,代码来源:Radio.c

示例4: BUZ_PrintHelp

static uint8_t BUZ_PrintHelp(const CLS1_StdIOType *io) {
  CLS1_SendHelpStr((unsigned char*)"buzzer", (unsigned char*)"Group of buzzer commands\r\n", io->stdOut);
  CLS1_SendHelpStr((unsigned char*)"  help|status", (unsigned char*)"Shows radio help or status\r\n", io->stdOut);
  CLS1_SendHelpStr((unsigned char*)"  buz <freq> <time>", (unsigned char*)"Beep for time (ms) and frequency (kHz)\r\n", io->stdOut);
  CLS1_SendHelpStr((unsigned char*)"  play tune", (unsigned char*)"Play tune\r\n", io->stdOut);
  return ERR_OK;
}
开发者ID:cknuesel,项目名称:INTRO_Maze_it,代码行数:7,代码来源:Buzzer.c

示例5: PrintHelp

static uint8_t PrintHelp(const CLS1_StdIOType *io) {
  CLS1_SendHelpStr((unsigned char*)"ref", (unsigned char*)"Group of Reflectance commands\r\n", io->stdOut);
  CLS1_SendHelpStr((unsigned char*)"  help|status", (unsigned char*)"Print help or status information\r\n", io->stdOut);
  CLS1_SendHelpStr((unsigned char*)"  calib (on|off)", (unsigned char*)"Calibrate while moving sensor over line\r\n", io->stdOut);
  CLS1_SendHelpStr((unsigned char*)"  led (on|off)", (unsigned char*)"Uses LED or not\r\n", io->stdOut);
  return ERR_OK;
}
开发者ID:sethj00,项目名称:mcuoneclipse,代码行数:7,代码来源:Reflectance.c

示例6: APP_PrintHelp

static void APP_PrintHelp(const CLS1_StdIOType *io) {
  CLS1_SendHelpStr((unsigned char*)"app", (unsigned char*)"Group of app commands\r\n", io->stdOut);
  CLS1_SendHelpStr((unsigned char*)"  help|status", (unsigned char*)"Shows radio help or status\r\n", io->stdOut);
#if PL_APP_FOLLOW_OBSTACLE
  CLS1_SendHelpStr((unsigned char*)"  follow (on|off)", (unsigned char*)"Obstacle following on or off\r\n", io->stdOut);
#endif
}
开发者ID:sethj00,项目名称:mcuoneclipse,代码行数:7,代码来源:Application.c

示例7: TRACE_PrintHelp

/*!
 * \brief Prints the help text to the console
 * \param io I/O channel to be used
 */
static void TRACE_PrintHelp(const CLS1_StdIOType *io) {
  CLS1_SendHelpStr((unsigned char*)"trace", (unsigned char*)"Group of trace commands\r\n", io->stdOut);
  CLS1_SendHelpStr((unsigned char*)"  help|status", (unsigned char*)"Shows trace help or status\r\n", io->stdOut);
  CLS1_SendHelpStr((unsigned char*)"  none|shell", (unsigned char*)"Sets the trace channel to be used\r\n", io->stdOut);
  CLS1_SendHelpStr((unsigned char*)"  accel on|off", (unsigned char*)"Enables or disables accelerometer trace\r\n", io->stdOut);
  CLS1_SendHelpStr((unsigned char*)"  magnetometer on|off", (unsigned char*)"Enables or disables magnetometer trace\r\n", io->stdOut);
}
开发者ID:jeffyoon,项目名称:mcuoneclipse,代码行数:11,代码来源:Trace.c

示例8: PID_PrintHelp

static void PID_PrintHelp(const CLS1_StdIOType *io) {
  CLS1_SendHelpStr((unsigned char*)"pid", (unsigned char*)"Group of PID commands\r\n", io->stdOut);
  CLS1_SendHelpStr((unsigned char*)"  help|status", (unsigned char*)"Shows PID help or status\r\n", io->stdOut);
  CLS1_SendHelpStr((unsigned char*)"  speed (L|R) (p|d|i|w) <value>", (unsigned char*)"Sets P, D, I or anti-windup position value\r\n", io->stdOut);
  CLS1_SendHelpStr((unsigned char*)"  pos (L|R) (p|d|i|w) <value>", (unsigned char*)"Sets P, D, I or anti-windup position value\r\n", io->stdOut);
  CLS1_SendHelpStr((unsigned char*)"  dis (p|d|i|w) <value>", (unsigned char*)"Sets P, D, I or anti-windup position value\r\n", io->stdOut);
}
开发者ID:tbmathis,项目名称:SUMO,代码行数:7,代码来源:Pid.c

示例9: BL_PrintHelp

static void BL_PrintHelp(CLS1_ConstStdIOType *io) {
  CLS1_SendHelpStr((unsigned char*)"BL", (const unsigned char*)"Group of Bootloader commands\r\n", io->stdOut);
  CLS1_SendHelpStr((unsigned char*)"  help|status", (const unsigned char*)"Print help or status information\r\n", io->stdOut);
  CLS1_SendHelpStr((unsigned char*)"  erase", (const unsigned char*)"Erase application flash blocks\r\n", io->stdOut);
  CLS1_SendHelpStr((unsigned char*)"  restart", (const unsigned char*)"Restart application with jump to reset vector\r\n", io->stdOut);
  CLS1_SendHelpStr((unsigned char*)"  load s19", (const unsigned char*)"Load S19 file\r\n", io->stdOut);
}
开发者ID:ADeadCat,项目名称:mcuoneclipse,代码行数:7,代码来源:Bootloader.c

示例10: CLS1_ParseCommand

/*
** ===================================================================
**     Method      :  CLS1_ParseCommand (component Shell)
**     Description :
**         Parses a shell command. Use 'help' to get a list of
**         supported commands.
**     Parameters  :
**         NAME            - DESCRIPTION
**       * cmd             - Pointer to command string
**       * handled         - Pointer to variable to indicate if
**                           the command has been handled. The caller
**                           passes this variable to the command scanner
**                           to find out if the passed command has been
**                           handled. The variable is initialized by the
**                           caller.
**       * io              - Pointer to I/O callbacks
**     Returns     :
**         ---             - Error code
** ===================================================================
*/
uint8_t CLS1_ParseCommand(const uint8_t *cmd, bool *handled, CLS1_ConstStdIOType *io)
{
  if (UTIL1_strcmp((char*)cmd, CLS1_CMD_HELP)==0 || UTIL1_strcmp((char*)cmd, "CLS1 help")==0) {
    CLS1_SendStr((unsigned char*)"\r\n", io->stdOut);
    CLS1_SendStr((unsigned char*)CLS1_DASH_LINE, io->stdOut);
    CLS1_SendStr((unsigned char*)"\r\n", io->stdOut);
    CLS1_SendStr((unsigned char*)"TWR-KV58F220M", io->stdOut);
    CLS1_SendStr((unsigned char*)"\r\n", io->stdOut);
    CLS1_SendStr((unsigned char*)CLS1_DASH_LINE, io->stdOut);
    CLS1_SendStr((unsigned char*)"\r\n", io->stdOut);
    CLS1_SendHelpStr((unsigned char*)"CLS1", (const unsigned char*)"Group of CLS1 commands\r\n", io->stdOut);
    CLS1_SendHelpStr((unsigned char*)"  help|status", (const unsigned char*)"Print help or status information\r\n", io->stdOut);
#if CLS1_ECHO_ENABLED
    CLS1_SendHelpStr((unsigned char*)"  echo (on|off)", (const unsigned char*)"Turn echo on or off\r\n", io->stdOut);
#endif
    *handled = TRUE;
    return ERR_OK;
#if CLS1_ECHO_ENABLED
  } else if ((UTIL1_strcmp((char*)cmd, "CLS1 echo on")==0)) {
    *handled = TRUE;
    CLS1_EchoEnabled = TRUE;
    return ERR_OK;
  } else if ((UTIL1_strcmp((char*)cmd, "CLS1 echo off")==0)) {
    *handled = TRUE;
    CLS1_EchoEnabled = FALSE;
    return ERR_OK;
#endif
  } else if ((UTIL1_strcmp((char*)cmd, CLS1_CMD_STATUS)==0) || (UTIL1_strcmp((char*)cmd, "CLS1 status")==0)) {
    *handled = TRUE;
    return CLS1_PrintStatus(io);
  }
  return ERR_OK; /* no error */
}
开发者ID:Johnnygx,项目名称:mcuoneclipse,代码行数:53,代码来源:CLS1.c

示例11: PrintHelp

static uint8_t PrintHelp(const CLS1_StdIOType *io) {
  CLS1_SendHelpStr((unsigned char*)"ref", (unsigned char*)"Group of Reflectance commands\r\n", io->stdOut);
  CLS1_SendHelpStr((unsigned char*)"  help|status", (unsigned char*)"Print help or status information\r\n", io->stdOut);
#if REF_START_STOP_CALIB
  CLS1_SendHelpStr((unsigned char*)"  calib (start|stop)", (unsigned char*)"Start/Stop calibrating while moving sensor over line\r\n", io->stdOut);
#endif
  return ERR_OK;
}
开发者ID:Naerrci,项目名称:INTRO_FC-Gring,代码行数:8,代码来源:Reflectance.c

示例12: PrintHelp

/*! 
 * \brief Prints the help text to the console
 * \param io I/O channel to be used
 */
static void PrintHelp(const CLS1_StdIOType *io) {
  CLS1_SendHelpStr((unsigned char *)"LowPower", (unsigned char *)"Group of LowPower commands\r\n", io->stdOut);
  CLS1_SendHelpStr((unsigned char *)"  help|status", (unsigned char *)"Shows help or status\r\n", io->stdOut);
  CLS1_SendHelpStr((unsigned char *)"  mode run|wait|sleep|stop", (unsigned char *)"Set low power mode\r\n", io->stdOut);
#if LP_CAN_CHANGE_CLOCK
  CLS1_SendHelpStr((unsigned char *)"  clock fast|medium|slow", (unsigned char *)"Set clock speed mode\r\n", io->stdOut);
#endif
}
开发者ID:AlexanderWiniger,项目名称:mcuoneclipse,代码行数:12,代码来源:LowPower.c

示例13: REMOTE_PrintHelp

static void REMOTE_PrintHelp(const CLS1_StdIOType *io) {
  CLS1_SendHelpStr((unsigned char*)"remote", (unsigned char*)"Group of remote commands\r\n", io->stdOut);
  CLS1_SendHelpStr((unsigned char*)"  help|status", (unsigned char*)"Shows remote help or status\r\n", io->stdOut);
  CLS1_SendHelpStr((unsigned char*)"  on|off", (unsigned char*)"Turns the remote on or off\r\n", io->stdOut);
  CLS1_SendHelpStr((unsigned char*)"  verbose on|off", (unsigned char*)"Turns the verbose mode on or off\r\n", io->stdOut);
#if PL_CONFIG_HAS_JOYSTICK
  CLS1_SendHelpStr((unsigned char*)"  joystick on|off", (unsigned char*)"Use joystick\r\n", io->stdOut);
#endif
}
开发者ID:troopa,项目名称:InfotronikRobot,代码行数:9,代码来源:Remote.c

示例14: PrintHelp

static void PrintHelp(const CLS1_StdIOType *io) {
    CLS1_SendHelpStr((unsigned char*)"app", (unsigned char*)"Group of application commands\r\n", io->stdOut);
    CLS1_SendHelpStr((unsigned char*)"  help", (unsigned char*)"Shows radio help or status\r\n", io->stdOut);
    CLS1_SendHelpStr((unsigned char*)"  saddr 0x<addr>", (unsigned char*)"Set source node address\r\n", io->stdOut);
    CLS1_SendHelpStr((unsigned char*)"  daddr 0x<addr>", (unsigned char*)"Set destination node address\r\n", io->stdOut);
#if PL_HAS_RSTDIO
    CLS1_SendHelpStr((unsigned char*)"  send (in/out/err)", (unsigned char*)"Send a string to stdio using the wireless transceiver\r\n", io->stdOut);
#endif
}
开发者ID:Joteyo,项目名称:mcuoneclipse,代码行数:9,代码来源:RNet_App.c

示例15: MAZE_PrintHelp

static void MAZE_PrintHelp(const CLS1_StdIOType *io) {
	CLS1_SendHelpStr((unsigned char*) "maze",
			(unsigned char*) "Group of maze following commands\r\n",
			io->stdOut);
	CLS1_SendHelpStr((unsigned char*) "  help|status",
			(unsigned char*) "Shows maze help or status\r\n", io->stdOut);
	CLS1_SendHelpStr((unsigned char*) "  clear",
			(unsigned char*) "Clear the maze solution\r\n", io->stdOut);
}
开发者ID:FlavioK,项目名称:intro,代码行数:9,代码来源:Maze.c


注:本文中的CLS1_SendHelpStr函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。