这篇教程C++ CLS1_SendHelpStr函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中CLS1_SendHelpStr函数的典型用法代码示例。如果您正苦于以下问题:C++ CLS1_SendHelpStr函数的具体用法?C++ CLS1_SendHelpStr怎么用?C++ CLS1_SendHelpStr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了CLS1_SendHelpStr函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: BLEUART_CMDMODE_ParseCommanduint8_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,
示例2: MM_ParseCommanduint8_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,
示例3: RADIO_PrintHelpstatic 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,
示例4: BUZ_PrintHelpstatic 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,
示例5: PrintHelpstatic 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,
示例6: APP_PrintHelpstatic 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,
示例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,
示例8: PID_PrintHelpstatic 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,
示例9: BL_PrintHelpstatic 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,
示例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,
示例11: PrintHelpstatic 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,
示例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,
示例13: REMOTE_PrintHelpstatic 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,
示例14: PrintHelpstatic 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,
示例15: MAZE_PrintHelpstatic 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,
示例16: APP_PrintHelpstatic 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#if PL_HAS_LINE_SENSOR CLS1_SendHelpStr((unsigned char*)" autocalib", (unsigned char*)"Automatically calibrate line sensor/r/n", io->stdOut);#endif}
开发者ID:BarberCol,项目名称:mcuoneclipse,代码行数:10,
示例17: ESP_PrintHelpstatic uint8_t ESP_PrintHelp(const CLS1_StdIOType *io) { CLS1_SendHelpStr("ESP", "ESP8200 commands/r/n", io->stdOut); //CLS1_SendHelpStr(" help|status", "Print help or status information/r/n", io->stdOut); CLS1_SendHelpStr(" send <str>", "Sends a string to the module/r/n", io->stdOut); CLS1_SendHelpStr(" test", "Sends a test AT command/r/n", io->stdOut); CLS1_SendHelpStr(" restart", "Restart module/r/n", io->stdOut); //CLS1_SendHelpStr(" listAP", "List available Access Points/r/n", io->stdOut); //CLS1_SendHelpStr(" connectAP /"ssid/",/"pwd/"", "Connect to an Access Point/r/n", io->stdOut); CLS1_SendHelpStr(" server (start|stop)", "Start or stop web server/r/n", io->stdOut); return ERR_OK;}
开发者ID:maciekhtc,项目名称:ZRJ-microcontroller,代码行数:11,
示例18: W5100_ParseCommanduint8_t W5100_ParseCommand(const unsigned char *cmd, bool *handled, CLS1_ConstStdIOType *io) { if (UTIL1_strcmp((char*)cmd, CLS1_CMD_HELP)==0 || UTIL1_strcmp((char*)cmd, "w5100 help")==0) { CLS1_SendHelpStr((unsigned char*)"w5100", (const unsigned char*)"Group of w5100 commands/r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*)" help|status", (const unsigned char*)"Print help or status information/r/n", io->stdOut); *handled = TRUE; return ERR_OK; } else if (UTIL1_strcmp((char*)cmd, CLS1_CMD_STATUS)==0 || UTIL1_strcmp((char*)cmd, "w5100 status")==0) { *handled = TRUE; return PrintStatus(io); } return ERR_OK; /* no error */}
开发者ID:appserver,项目名称:mcuoneclipse,代码行数:12,
示例19: BUZ_ParseCommanduint8_t BUZ_ParseCommand(const unsigned char *cmd, bool *handled, const CLS1_StdIOType *io){ if (UTIL1_strcmp((char*)cmd, CLS1_CMD_HELP)==0 || UTIL1_strcmp((char*)cmd, "BUZ1 help")==0) { *handled = TRUE; CLS1_SendHelpStr((unsigned char*)"BUZ", (unsigned char*)"Group of BUZ commands/r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*)" beep", (unsigned char*)"Beep with 1kHz for 1 sec/r/n", io->stdOut); return ERR_OK; } else if (UTIL1_strcmp((char*)cmd, "BUZ beep")==0) { *handled = TRUE; return BUZ_Beep(1000, 1000); } return ERR_OK;}
开发者ID:sisem,项目名称:intro,代码行数:13,
示例20: PrintHelpstatic uint8_t PrintHelp(const CLS1_StdIOType *io) { CLS1_SendHelpStr((unsigned char*) "player", (unsigned char*) "Group of player 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*) " volume <number>", (unsigned char*) "Set volume, full: 0x0000, 0xFEFE silence/r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*) " play <file>", (unsigned char*) "Play song file/r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*) " player pause on", (unsigned char*) "player pause on /r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*) " player pause off", (unsigned char*) "player pause off /r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*) " player stop", (unsigned char*) "player stop /r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*) " player setval <val>", (unsigned char*) "Sets time duration of alarmlight ", io->stdOut); return ERR_OK;}
开发者ID:danstadelmann,项目名称:BDA_Buzzer,代码行数:28,
示例21: Q4CLeft_ParseCommand/*! * /brief Parses a command * /param cmd Command string to be parsed * /param handled Sets this variable to TRUE if command was handled * /param io I/O stream to be used for input/output * /return Error code, ERR_OK if everything was fine */uint8_t Q4CLeft_ParseCommand(const unsigned char *cmd, bool *handled, const CLS1_StdIOType *io){ uint8_t res=ERR_OK; if (UTIL1_strcmp((const char*)cmd, CLS1_CMD_HELP)==0 || UTIL1_strcmp((const char *)cmd, "Q4CLeft help")==0) { CLS1_SendHelpStr((const unsigned char*)"Q4CLeft", (const unsigned char*)"Q4CLeft command group/r/n", io->stdOut); CLS1_SendHelpStr((const unsigned char*)" help|status", (const unsigned char*)"Print help or status information/r/n", io->stdOut); CLS1_SendHelpStr((const unsigned char*)" reset", (const unsigned char*)"Reset the current position counter/r/n", io->stdOut); *handled = TRUE; } else if (UTIL1_strcmp((const char*)cmd, CLS1_CMD_STATUS)==0 || UTIL1_strcmp((const char*)cmd, "Q4CLeft status")==0) { CLS1_SendStr((const unsigned char*)"Q4CLeft:/r/n", io->stdOut); CLS1_SendStatusStr((const unsigned char*)" pos", (const unsigned char*)"", io->stdOut); #if Q4CLeft_CNTR_BITS==16 CLS1_SendNum16u(Q4CLeft_currPos, io->stdOut); #elif Q4CLeft_CNTR_BITS==32 CLS1_SendNum32u(Q4CLeft_currPos, io->stdOut); #else #error "unknown counter size!" #endif CLS1_SendStr((const unsigned char*)", ", io->stdOut); #if Q4CLeft_CNTR_BITS==16 CLS1_SendNum16s((int16_t)Q4CLeft_currPos, io->stdOut); #elif Q4CLeft_CNTR_BITS==32 CLS1_SendNum32s((int32_t)Q4CLeft_currPos, io->stdOut); #else #error "unknown counter size!" #endif CLS1_SendStr((const unsigned char*)"/r/n", io->stdOut); CLS1_SendStatusStr((const unsigned char*)" C1 C2", (const unsigned char*)"", io->stdOut); if (Q4CLeft_GET_C1_PIN()!=0) { CLS1_SendStr((const unsigned char*)"1 ", io->stdOut); } else { CLS1_SendStr((const unsigned char*)"0 ", io->stdOut); } if (Q4CLeft_GET_C2_PIN()!=0) { CLS1_SendStr((const unsigned char*)"1/r/n", io->stdOut); } else { CLS1_SendStr((const unsigned char*)"0/r/n", io->stdOut); } CLS1_SendStatusStr((const unsigned char*)" errors", (const unsigned char*)"", io->stdOut); CLS1_SendNum16u(Q4CLeft_nofErrors, io->stdOut); CLS1_SendStr((const unsigned char*)"/r/n", io->stdOut); *handled = TRUE; } else if (UTIL1_strcmp((const char*)cmd, "Q4CLeft reset")==0) { Q4CLeft_SetPos(0); Q4CLeft_nofErrors = 0; *handled = TRUE; } return res;}
开发者ID:FlorianOechslin,项目名称:Robo,代码行数:57,
示例22: NEO_ParseCommanduint8_t NEO_ParseCommand(const unsigned char *cmd, bool *handled, const CLS1_StdIOType *io) { uint8_t res = ERR_OK; uint32_t color; int32_t tmp, x, y; const uint8_t *p; if (UTIL1_strcmp((char*)cmd, CLS1_CMD_HELP)==0 || UTIL1_strcmp((char*)cmd, "neo help")==0) { CLS1_SendHelpStr((unsigned char*)"neo", (const unsigned char*)"Group of neo 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*)" clear all", (const unsigned char*)"Clear all pixels/r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*)" set all <rgb>", (const unsigned char*)"Set all pixel with RGB value/r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*)" set <x> <y> <rgb>", (const unsigned char*)"Set pixel with RGB value/r/n", io->stdOut); *handled = TRUE; return ERR_OK; } else if ((UTIL1_strcmp((char*)cmd, CLS1_CMD_STATUS)==0) || (UTIL1_strcmp((char*)cmd, "neo status")==0)) { *handled = TRUE; return PrintStatus(io); } else if (UTIL1_strcmp((char*)cmd, "neo clear all")==0) { NEO_ClearAllPixel(); NEO_TransferPixels(); *handled = TRUE; return ERR_OK; } else if (UTIL1_strncmp((char*)cmd, "neo set all", sizeof("neo set all")-1)==0) { p = cmd+sizeof("neo set all")-1; res = UTIL1_xatoi(&p, &tmp); /* read color RGB value */ if (res==ERR_OK && tmp>=0 && tmp<=0xffffff) { /* within RGB value */ color = tmp; NEO_SetAllPixelColor(color); NEO_TransferPixels(); *handled = TRUE; } } else if (UTIL1_strncmp((char*)cmd, "neo set", sizeof("neo set")-1)==0) { p = cmd+sizeof("neo set")-1; res = UTIL1_xatoi(&p, &x); /* read x pixel index */ if (res==ERR_OK && x>=0 && x<NEO_NOF_X) { res = UTIL1_xatoi(&p, &y); /* read y pixel index */ if (res==ERR_OK && y>=0 && y<NEO_NOF_Y) { res = UTIL1_xatoi(&p, &tmp); /* read color RGB value */ if (res==ERR_OK && tmp>=0 && tmp<=0xffffff) { color = tmp; NEO_SetPixelColor((NEO_PixelIdxT)x, (NEO_PixelIdxT)y, color); NEO_TransferPixels(); *handled = TRUE; } } } } return res;}
开发者ID:adichola,项目名称:mcuoneclipse,代码行数:49,
示例23: DRV_PrintHelpstatic void DRV_PrintHelp(const CLS1_StdIOType *io) { CLS1_SendHelpStr((unsigned char*)"drive", (unsigned char*)"Group of drive 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*)" speed (on|off)", (unsigned char*)"Turns speed pid on or ff/r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*)" speed (L|R) <value>", (unsigned char*)"Sets speed value/r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*)" pos (on|off)", (unsigned char*)"Turns speed pid on or ff/r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*)" pos (L|R) <value>", (unsigned char*)"Sets speed value/r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*)" pos LR <value>", (unsigned char*)"Sets speed value/r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*)" angle <value>", (unsigned char*)"turns robot/r/n", io->stdOut);}
开发者ID:chregubr85,项目名称:42,代码行数:10,
示例24: TURN_PrintHelpstatic void TURN_PrintHelp(const CLS1_StdIOType *io) { CLS1_SendHelpStr((unsigned char*)"turn", (unsigned char*)"Group of turning commands/r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*)" help|status", (unsigned char*)"Shows turn help or status/r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*)" left|right|around", (unsigned char*)"Turn the robot/r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*)" duty <percent>", (unsigned char*)"Turning motor PWM duty percent/r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*)" time <ms>", (unsigned char*)"Turning time in milli-seconds for 90 degrees/r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*)" step <ms>", (unsigned char*)"Time in milli-seconds for a single step/r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*)" forward", (unsigned char*)"Move one step forward/r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*)" backward", (unsigned char*)"Move one step backward/r/n", io->stdOut);}
开发者ID:sjayaram91,项目名称:mcuoneclipse,代码行数:10,
示例25: PrintHelpstatic uint8_t PrintHelp(const CLS1_StdIOType *io) { CLS1_SendHelpStr((unsigned char*)"MCP4728", (unsigned char*)"Group of MCP4728 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*)" reset", (unsigned char*)"General Call Reset/r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*)" wakeup", (unsigned char*)"General Call Wake-Up/r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*)" update", (unsigned char*)"General Call software update/r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*)" fastwrite all 0x...", (unsigned char*)"Fast write all channel DAC values with four 12bit hex values (EEPROM not affected)/r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*)" fastwrite <ch> 0x...", (unsigned char*)"Fast write single channel (0..3) DAC value with a 12bit hex value (EEPROM not affected)/r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*)" write <ch> <val>", (unsigned char*)"Single write EEPROM and DAC value channel (hex 12bit) for channel 0-3/r/n", io->stdOut); return ERR_OK;}
开发者ID:emmeneggerc,项目名称:INTRO_EF,代码行数:11,
示例26: MOT_PrintHelpstatic void MOT_PrintHelp(const CLS1_StdIOType *io) { CLS1_SendHelpStr((unsigned char*)"motor", (unsigned char*)"Group of motor commands/r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*)" help|status", (unsigned char*)"Shows motor help or status/r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*)" (L|R) forward|backward", (unsigned char*)"Change motor direction/r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*)" (L|R) duty <number>", (unsigned char*)"Change motor PWM (-100..+100)%/r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*)" motor both go", (unsigned char*)"Starts the motors forward with 15% duty/r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*)" motor both (fw|bw)", (unsigned char*)"Sets motors direction/r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*)" motor stop", (unsigned char*)"Stops the motors/r/n", io->stdOut);}
开发者ID:johnfab,项目名称:IntroFabioStefanie,代码行数:9,
示例27: 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*)"FRDM-KL25Z Master INTRO", 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); *handled = TRUE; return ERR_OK; } 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:FlorianOechslin,项目名称:FRDM,代码行数:40,
示例28: ParseCommand/*! * /brief Parses a command * /param cmd Command string to be parsed * /param handled Sets this variable to TRUE if command was handled * /param io I/O stream to be used for input/output * /return Error code, ERR_OK if everything was fine */static uint8_t ParseCommand(const unsigned char *cmd, bool *handled, const CLS1_StdIOType *io) { /* handling our own commands */ if (UTIL1_strcmp((char*)cmd, CLS1_CMD_HELP)==0) { CLS1_SendHelpStr((const unsigned char*)"run benchmark", (const unsigned char*)"Run FatFS benchmark/r/n", io->stdOut); *handled = TRUE; } else if (UTIL1_strcmp((char*)cmd, "run benchmark")==0) { benchmark(io); *handled = TRUE; } return ERR_OK;}
开发者ID:sgukang,项目名称:mcuoneclipse,代码行数:18,
示例29: PID_PrintHelpstatic 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*)" fw (p|d|i|w) <value>", (unsigned char*)"Sets P, D, I or anti-windup line value/r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*)" fw speed <value>", (unsigned char*)"Maximum speed % value/r/n", io->stdOut);#if PL_GO_DEADEND_BW CLS1_SendHelpStr((unsigned char*)" bw (p|d|i|w) <value>", (unsigned char*)"Sets P, D, I or anti-windup backward value/r/n", io->stdOut); CLS1_SendHelpStr((unsigned char*)" bw speed <value>", (unsigned char*)"Maximum backward speed % value/r/n", io->stdOut);#endif#if PL_HAS_QUADRATURE CLS1_SendHelpStr((unsigned char*)" pos (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 speed <value>", (unsigned char*)"Maximum speed % value/r/n", io->stdOut);#endif}
开发者ID:sethj00,项目名称:mcuoneclipse,代码行数:14,
注:本文中的CLS1_SendHelpStr函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ CLSIDFromProgID函数代码示例 C++ CLS1_GetStdio函数代码示例 |