Skip to content

Commit 44ee9a7

Browse files
author
Cruz Monrreal
authored
Merge pull request #8686 from cmonr/rollup
Rollup PR:
2 parents 662b744 + b353136 commit 44ee9a7

File tree

17 files changed

+882
-657
lines changed

17 files changed

+882
-657
lines changed

features/cellular/easy_cellular/CellularConnectionFSM.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ void CellularConnectionFSM::stop()
8484
_queue_thread = NULL;
8585
}
8686

87+
if (_at_queue) {
88+
_at_queue->chain(NULL);
89+
_at_queue = NULL;
90+
}
91+
8792
if (_power) {
8893
_cellularDevice->close_power();
8994
_power = NULL;
@@ -131,6 +136,10 @@ nsapi_error_t CellularConnectionFSM::init()
131136
}
132137

133138
_at_queue = _cellularDevice->get_queue();
139+
if (!_at_queue) {
140+
stop();
141+
return NSAPI_ERROR_NO_MEMORY;
142+
}
134143
_at_queue->chain(&_queue);
135144

136145
_retry_count = 0;

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)