-
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
ad45ecc
commit 6cc6ece
Showing
11 changed files
with
115 additions
and
4 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
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