Sync mbed-client-cli files with v0.4.0

Sync mbed-client-cli with master repo v0.4.0.
pull/8677/head
Arto Kinnunen 2018-11-08 11:24:48 +02:00
parent 0fe6369950
commit 2d10cebd00
2 changed files with 565 additions and 210 deletions

View File

@ -129,7 +129,7 @@ uint8_t cmd_history_size(uint8_t max);
* \param fmt console print function (like printf)
*/
#if defined(__GNUC__) || defined(__CC_ARM)
void cmd_printf(const char *fmt, ...) __attribute__ ((__format__(__printf__, 1, 2)));
void cmd_printf(const char *fmt, ...) __attribute__((__format__(__printf__, 1, 2)));
#else
void cmd_printf(const char *fmt, ...);
#endif
@ -139,7 +139,7 @@ void cmd_printf(const char *fmt, ...);
* \param ap list of parameters needed by format string. This must correspond properly with the conversion specifier.
*/
#if defined(__GNUC__) || defined(__CC_ARM)
void cmd_vprintf(const char *fmt, va_list ap) __attribute__ ((__format__(__printf__, 1, 0)));
void cmd_vprintf(const char *fmt, va_list ap) __attribute__((__format__(__printf__, 1, 0)));
#else
void cmd_vprintf(const char *fmt, va_list ap);
#endif
@ -273,6 +273,26 @@ void cmd_alias_add(const char *alias, const char *value);
* \param value Value for variable. Values can contains white spaces and '"' or '"' characters.
*/
void cmd_variable_add(char *variable, char *value);
/**
* Add integer variable to interpreter.
* Variables are replaced with values before executing a command.
* \code
cmd_variable_add_int("world", 2);
cmd_exe("echo $world"); // this is now same as 'echo 2' .
* \endcode
* \param variable Variable name, which will be replaced in interpreter.
* \param value Value for variable
*/
void cmd_variable_add_int(char *variable, int value);
/**
* Request screen size from host
* Response are stored to variables:
* COLUMNS and LINES - as integer values.
* Note: Require terminal that handle request codes, like screen.
*/
void cmd_request_screen_size(void);
/** find command parameter index by key.
* e.g.

File diff suppressed because it is too large Load Diff