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:
parent
1d033a9a26
commit
8587bb19a7
7 changed files with 218 additions and 19 deletions
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue