Skip to content

Commit 4ac94c0

Browse files
Arto Kinnunenadbridge
Arto Kinnunen
authored andcommitted
Sync mbed-client-cli files with v0.4.0
Sync mbed-client-cli with master repo v0.4.0.
1 parent 10b0af1 commit 4ac94c0

File tree

2 files changed

+565
-210
lines changed

2 files changed

+565
-210
lines changed

features/frameworks/mbed-client-cli/mbed-client-cli/ns_cmdline.h

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ uint8_t cmd_history_size(uint8_t max);
129129
* \param fmt console print function (like printf)
130130
*/
131131
#if defined(__GNUC__) || defined(__CC_ARM)
132-
void cmd_printf(const char *fmt, ...) __attribute__ ((__format__(__printf__, 1, 2)));
132+
void cmd_printf(const char *fmt, ...) __attribute__((__format__(__printf__, 1, 2)));
133133
#else
134134
void cmd_printf(const char *fmt, ...);
135135
#endif
@@ -139,7 +139,7 @@ void cmd_printf(const char *fmt, ...);
139139
* \param ap list of parameters needed by format string. This must correspond properly with the conversion specifier.
140140
*/
141141
#if defined(__GNUC__) || defined(__CC_ARM)
142-
void cmd_vprintf(const char *fmt, va_list ap) __attribute__ ((__format__(__printf__, 1, 0)));
142+
void cmd_vprintf(const char *fmt, va_list ap) __attribute__((__format__(__printf__, 1, 0)));
143143
#else
144144
void cmd_vprintf(const char *fmt, va_list ap);
145145
#endif
@@ -273,6 +273,26 @@ void cmd_alias_add(const char *alias, const char *value);
273273
* \param value Value for variable. Values can contains white spaces and '"' or '"' characters.
274274
*/
275275
void cmd_variable_add(char *variable, char *value);
276+
/**
277+
* Add integer variable to interpreter.
278+
* Variables are replaced with values before executing a command.
279+
* \code
280+
cmd_variable_add_int("world", 2);
281+
cmd_exe("echo $world"); // this is now same as 'echo 2' .
282+
* \endcode
283+
* \param variable Variable name, which will be replaced in interpreter.
284+
* \param value Value for variable
285+
286+
*/
287+
void cmd_variable_add_int(char *variable, int value);
288+
/**
289+
* Request screen size from host
290+
* Response are stored to variables:
291+
* COLUMNS and LINES - as integer values.
292+
* Note: Require terminal that handle request codes, like screen.
293+
*/
294+
void cmd_request_screen_size(void);
295+
276296

277297
/** find command parameter index by key.
278298
* e.g.

0 commit comments

Comments
 (0)