-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nrf_rpc: Added sm_ipt backend support
Added support for sm_ipt backend Updated templates, updated Kconfig to support sm_ipt. Signed-off-by: Dominik Chat <dominik.chat@nordicsemi.no> Co-authored-by: Dominik Kilian <Dominik.Kilian@nordicsemi.no>
- Loading branch information
1 parent
ed59241
commit 636f1b5
Showing
13 changed files
with
126 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
# | ||
# Copyright (c) 2020 Nordic Semiconductor | ||
# Copyright (c) 2020-2021 Nordic Semiconductor | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
|
||
zephyr_include_directories(include) | ||
|
||
zephyr_library() | ||
zephyr_library_sources(nrf_rpc.c) | ||
|
||
zephyr_library_sources_ifdef(CONFIG_NRF_RPC_CBOR nrf_rpc_cbor.c) | ||
zephyr_library_sources_ifdef(CONFIG_NRF_RPC_TR_SHMEM sm_ipt_backend.c) | ||
zephyr_library_sources_ifdef(CONFIG_NRF_RPC nrf_rpc.c) | ||
|
||
zephyr_linker_sources(SECTIONS nrf_rpc.ld) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Copyright (c) 2021 Nordic Semiconductor ASA | ||
* | ||
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
*/ | ||
|
||
#ifndef SM_IPT_BACKEND_H | ||
#define SM_IPT_BACKEND_H | ||
|
||
#include <sm_ipt.h> | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
extern struct sm_ipt_ctx sm_ipt_context; | ||
|
||
static inline int nrf_rpc_tr_init(sm_ipt_receive_handler_t callback) | ||
{ | ||
return sm_ipt_init(&sm_ipt_context, callback); | ||
} | ||
|
||
static inline void nrf_rpc_tr_free_rx_buf(const uint8_t *packet) | ||
{ | ||
sm_ipt_free_rx_buf(&sm_ipt_context, packet); | ||
} | ||
|
||
static inline void nrf_rpc_tr_alloc_tx_buf(uint8_t **buf, size_t len) | ||
{ | ||
sm_ipt_alloc_tx_buf(&sm_ipt_context, buf, len); | ||
} | ||
|
||
static inline void nrf_rpc_tr_free_tx_buf(uint8_t *buf) | ||
{ | ||
sm_ipt_free_tx_buf(&sm_ipt_context, buf); | ||
} | ||
|
||
static inline int nrf_rpc_tr_send(uint8_t *buf, size_t len) | ||
{ | ||
return sm_ipt_send(&sm_ipt_context, buf, len); | ||
} | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
* Copyright (c) 2021 Nordic Semiconductor ASA | ||
* | ||
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
*/ | ||
|
||
#include "sm_ipt_backend.h" | ||
|
||
struct sm_ipt_ctx sm_ipt_context; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters