Embedded TCP/IP stack
4.7.0
|
fnet_return_t fnet_shell_block | ( | fnet_shell_desc_t | desc, |
void(*)(fnet_shell_desc_t shl_desc, void *cookie) | on_ctrlc, | ||
void * | cookie | ||
) |
Blocks the shell to ignore user commands.
desc | Shell service descriptor. |
on_ctrlc | Pointer to the callback function called on the [Ctrl]+[c] button pressing. This parameter is optional and can be set to FNET_NULL. |
cookie | Optional application-specific parameter. It's passed to the on_ctrlc function as input parameter. |
This function moves the shell to the blocking state. In this state the shell ignore any commands entered by a user into a terminal console.
The shell can be unblocked by the fnet_shell_unblock() function. Also the shell may be unblocked by pressing the [Ctrl]+[c] button combination in a terminal console, after that the optional callback function, pointed by the on_ctrlc()
parameter, will be called.