Skip to content

Commit 3b55149

Browse files
committed
Added check for rpmsg if it is using static api when erpc is set to use static api
Signed-off-by: Cervenka Dusan <[email protected]>
1 parent db59d16 commit 3b55149

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

erpc_c/transports/erpc_rpmsg_lite_base_transport.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,17 @@
1212
#define _EMBEDDED_RPC__RPMSG_LITE_BASE_TRANSPORT_H_
1313

1414
#include "erpc_transport.h"
15+
#include "erpc_config_internal.h"
1516

1617
#include "rpmsg_lite.h"
1718

19+
#if ERPC_ALLOCATION_POLICY == ERPC_STATIC_POLICY
20+
#ifndef RL_USE_STATIC_API
21+
#warning "RPMSG is not set to use static allocation"
22+
#endif
23+
#endif
24+
25+
1826
/*!
1927
* @addtogroup rpmsg_lite_transport
2028
* @addtogroup rpmsg_lite_rtos_transport

erpc_c/transports/erpc_rpmsg_lite_rtos_transport.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ erpc_status_t RPMsgRTOSTransport::init(uint32_t src_addr, uint32_t dst_addr, voi
9191
if (status == kErpcStatus_Success)
9292
{
9393
#if RL_USE_STATIC_API
94-
m_rpmsg_queue = rpmsg_queue_create(s_rpmsg, m_queue_stack, &m_queu_context);
94+
m_rpmsg_queue = rpmsg_queue_create(s_rpmsg, m_queue_stack, &m_queue_context);
9595
#else
9696
m_rpmsg_queue = rpmsg_queue_create(s_rpmsg);
9797
#endif
@@ -172,7 +172,7 @@ erpc_status_t RPMsgRTOSTransport::init(uint32_t src_addr, uint32_t dst_addr, voi
172172
}
173173

174174
#if RL_USE_STATIC_API
175-
m_rpmsg_queue = rpmsg_queue_create(s_rpmsg, m_queue_stack, &m_queu_context);
175+
m_rpmsg_queue = rpmsg_queue_create(s_rpmsg, m_queue_stack, &m_queue_context);
176176
#else
177177
m_rpmsg_queue = rpmsg_queue_create(s_rpmsg);
178178
#endif

erpc_c/transports/erpc_rpmsg_tty_rtos_transport.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ erpc_status_t RPMsgTTYRTOSTransport::init(uint32_t src_addr, uint32_t dst_addr,
9898
if (status == kErpcStatus_Success)
9999
{
100100
#if RL_USE_STATIC_API
101-
m_rpmsg_queue = rpmsg_queue_create(s_rpmsg, m_queue_stack, &m_queu_context);
101+
m_rpmsg_queue = rpmsg_queue_create(s_rpmsg, m_queue_stack, &m_queue_context);
102102
#else
103103
m_rpmsg_queue = rpmsg_queue_create(s_rpmsg);
104104
#endif
@@ -179,7 +179,7 @@ erpc_status_t RPMsgTTYRTOSTransport::init(uint32_t src_addr, uint32_t dst_addr,
179179
}
180180

181181
#if RL_USE_STATIC_API
182-
m_rpmsg_queue = rpmsg_queue_create(s_rpmsg, m_queue_stack, &m_queu_context);
182+
m_rpmsg_queue = rpmsg_queue_create(s_rpmsg, m_queue_stack, &m_queue_context);
183183
#else
184184
m_rpmsg_queue = rpmsg_queue_create(s_rpmsg);
185185
#endif

0 commit comments

Comments
 (0)