smp: shell: Add support for SMP in new shell.

Added smp support for new shell.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
This commit is contained in:
Mieszko Mierunski 2019-01-10 13:13:09 +01:00 committed by Anas Nashif
commit 8587bb19a7
7 changed files with 218 additions and 19 deletions

View file

@ -330,6 +330,15 @@ struct shell_transport_api {
int (*read)(const struct shell_transport *transport,
void *data, size_t length, size_t *cnt);
/**
* @brief Function called in shell thread loop.
*
* Can be used for backend operations that require longer execution time
*
* @param[in] transport Pointer to the transfer instance.
*/
void (*update)(const struct shell_transport *transport);
};
struct shell_transport {

View file

@ -10,6 +10,9 @@
#include <shell/shell.h>
#include <ring_buffer.h>
#include <atomic.h>
#ifdef CONFIG_MCUMGR_SMP_SHELL
#include "mgmt/smp_shell.h"
#endif
#ifdef __cplusplus
extern "C" {
@ -24,6 +27,9 @@ struct shell_uart_ctrl_blk {
void *context;
atomic_t tx_busy;
bool blocking;
#ifdef CONFIG_MCUMGR_SMP_SHELL
struct smp_shell_data smp;
#endif /* CONFIG_MCUMGR_SMP_SHELL */
};
#ifdef CONFIG_SHELL_BACKEND_SERIAL_INTERRUPT_DRIVEN