-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4630822
commit 5c2c6b7
Showing
282 changed files
with
8,374 additions
and
128 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 |
---|---|---|
|
@@ -112,3 +112,6 @@ boost*/ | |
mingw.7z | ||
mingw64/ | ||
vs_BuildTools* | ||
|
||
# Zephyr's repo link | ||
__repo__/ |
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,37 @@ | ||
Release Name: eRPC | ||
Release Version: 1.12.0 | ||
Package License: BSD-3-Clause | ||
|
||
the_bus_pirate Name: The Bus Pirate | ||
Version: NA | ||
Outgoing License: Open Source - CC0 (Public Domain | ||
Dedication License) | ||
License File: http://code.google.com/p/the-bus-pirate/ | ||
Format: source code | ||
Description: OS independent serial interface | ||
Location: | ||
erpc_c/port/erpc_serial.h, | ||
erpc_c/port/erpc_serial.cpp | ||
Origin: Community | ||
Url: http://code.google.com/p/the-bus-pirate/ | ||
|
||
cpp_template Name: CPP Template | ||
Version: NA | ||
Outgoing License: Open Source - MIT | ||
License File: | ||
erpcgen/src/cpptemplate/LICENSE.txt | ||
Format: source code | ||
Description: CPP Template | ||
Location: erpcgen/src/cpptemplate | ||
Origin: Ryan Ginstrom & Martinho Fernandes | ||
|
||
cpp_option_parser Name: C++ option-parser | ||
Version: NA | ||
Outgoing License: Brad Appleton's license | ||
License File: http://www.bradapp.com/ftp/src/libs/C++/Options.tar.gz | ||
, see README file | ||
Format: Plain Text | ||
Description: C++ option-parser | ||
Location: erpcgen/src/options.cpp | ||
Origin: Brad Appleton [email protected] | ||
Url: http://www.bradapp.com/ftp/src/libs/C++/Options.html |
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,74 @@ | ||
/* | ||
* Copyright 2023 NXP | ||
* | ||
* | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/ | ||
|
||
#include "erpc_manually_constructed.hpp" | ||
#include "erpc_transport_setup.h" | ||
#include "erpc_mbox_zephyr_transport.hpp" | ||
|
||
using namespace erpc; | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
// Variables | ||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
ERPC_MANUALLY_CONSTRUCTED_STATIC(MBOXTransport, s_transport); | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
// Code | ||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
erpc_transport_t erpc_transport_zephyr_mbox_init(void *dev, void *tx_channel, void *rx_channel) | ||
{ | ||
erpc_transport_t transport; | ||
MBOXTransport *mboxTransport; | ||
|
||
#if ERPC_ALLOCATION_POLICY == ERPC_ALLOCATION_POLICY_STATIC | ||
if (s_transport.isUsed()) | ||
{ | ||
mboxTransport = NULL; | ||
} | ||
else | ||
{ | ||
s_transport.construct((struct device *)dev, (struct mbox_channel *)tx_channel, | ||
(struct mbox_channel *)rx_channel); | ||
mboxTransport = s_transport.get(); | ||
} | ||
|
||
#elif ERPC_ALLOCATION_POLICY == ERPC_ALLOCATION_POLICY_DYNAMIC | ||
mboxTransport = | ||
new MBOXTransport((struct device *)dev, (struct mbox_channel *)tx_channel, (struct mbox_channel *)rx_channel); | ||
#else | ||
#error "Unknown eRPC allocation policy!" | ||
#endif | ||
|
||
transport = reinterpret_cast<erpc_transport_t>(mboxTransport); | ||
|
||
if (mboxTransport != NULL) | ||
{ | ||
if (mboxTransport->init() != kErpcStatus_Success) | ||
{ | ||
erpc_transport_zephyr_mbox_deinit(transport); | ||
transport = NULL; | ||
} | ||
} | ||
|
||
return transport; | ||
} | ||
|
||
void erpc_transport_zephyr_mbox_deinit(erpc_transport_t transport) | ||
{ | ||
#if ERPC_ALLOCATION_POLICY == ERPC_ALLOCATION_POLICY_STATIC | ||
(void)transport; | ||
s_transport.destroy(); | ||
#elif ERPC_ALLOCATION_POLICY == ERPC_ALLOCATION_POLICY_DYNAMIC | ||
erpc_assert(transport != NULL); | ||
|
||
MBOXTransport *mboxTransport = reinterpret_cast<MBOXTransport *>(transport); | ||
|
||
delete mboxTransport; | ||
#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
Oops, something went wrong.