| eRPC API Reference Rev. 1.8.1 NXP Semiconductors

- Main Page
- API Reference
- Classes
- Files

- File List
- File Members

erpc_rpmsg_lite_rtos_transport.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2015-2016, Freescale Semiconductor, Inc.
3 * Copyright 2016-2020 NXP
4 * All rights reserved.
5 *
6 *
7 * SPDX-License-Identifier: BSD-3-Clause
8 */
9
10 #ifndef _EMBEDDED_RPC__RPMSG_LITE_RTOS_TRANSPORT_H_
11 #define _EMBEDDED_RPC__RPMSG_LITE_RTOS_TRANSPORT_H_
12
13 #include "erpc_message_buffer.h"
14 #include "erpc_rpmsg_lite_base_transport.h"
15
16 #include "rpmsg_lite.h"
17 #include "rpmsg_queue.h"
18
25 // Definitions
28
30 // Classes
32
33 namespace erpc {
39 class RPMsgRTOSTransport : public RPMsgBaseTransport
40 {
41 public:
47 RPMsgRTOSTransport(void);
48
52 virtual ~RPMsgRTOSTransport(void);
53
66 virtual erpc_status_t init(uint32_t src_addr, uint32_t dst_addr, void *base_address, uint32_t length,
67 uint32_t rpmsg_link_id);
68
83 virtual erpc_status_t init(uint32_t src_addr, uint32_t dst_addr, void *base_address, uint32_t rpmsg_link_id,
84 void (*ready_cb)(void), char *nameservice_name);
85
96 virtual erpc_status_t receive(MessageBuffer *message);
97
106 virtual erpc_status_t send(MessageBuffer *message);
107
115 virtual bool hasMessage(void) { return ((rpmsg_queue_get_current_size(m_rpmsg_queue) > 0) ? true : false); }
116
117 protected:
118 /* Remote device */
119 struct remote_device *m_rdev;
120 struct rpmsg_channel *m_app_rp_chnl;
121 uint32_t m_dst_addr;
122 rpmsg_queue_handle m_rpmsg_queue;
123 struct rpmsg_lite_endpoint *m_rpmsg_ept;
124 };
125
126 } // namespace erpc
127
130 #endif // _EMBEDDED_RPC__RPMSG_LITE_RTOS_TRANSPORT_H_
erpc::RPMsgRTOSTransport::receive
virtual erpc_status_t receive(MessageBuffer *message)
Store incoming message to message buffer.
Definition: erpc_rpmsg_lite_rtos_transport.cpp:221
erpc_status_t
enum _erpc_status erpc_status_t
Type used for all status and error return values.
Definition: erpc_common.h:87
erpc::RPMsgRTOSTransport
Transport that uses RPMsg zero copy RTOS API for interprocessor messaging.
Definition: erpc_rpmsg_lite_rtos_transport.h:39
erpc::RPMsgRTOSTransport::send
virtual erpc_status_t send(MessageBuffer *message)
Function to send prepared message.
Definition: erpc_rpmsg_lite_rtos_transport.cpp:235
erpc::RPMsgRTOSTransport::init
virtual erpc_status_t init(uint32_t src_addr, uint32_t dst_addr, void *base_address, uint32_t length, uint32_t rpmsg_link_id)
This function call RPMsg rtos init function - as RPMsg master.
Definition: erpc_rpmsg_lite_rtos_transport.cpp:74
erpc::RPMsgRTOSTransport::m_dst_addr
uint32_t m_dst_addr
Definition: erpc_rpmsg_lite_rtos_transport.h:121
erpc::MessageBuffer
Represents a memory buffer containing a message.
Definition: erpc_message_buffer.h:37
erpc
Definition: erpc_arbitrated_client_manager.h:25
erpc::RPMsgRTOSTransport::RPMsgRTOSTransport
RPMsgRTOSTransport(void)
Constructor.
Definition: erpc_rpmsg_lite_rtos_transport.cpp:31
erpc_rpmsg_lite_base_transport.h
erpc_message_buffer.h
erpc::RPMsgRTOSTransport::m_rpmsg_queue
rpmsg_queue_handle m_rpmsg_queue
Definition: erpc_rpmsg_lite_rtos_transport.h:122
erpc::RPMsgRTOSTransport::~RPMsgRTOSTransport
virtual ~RPMsgRTOSTransport(void)
RPMsgRTOSTransport destructor.
Definition: erpc_rpmsg_lite_rtos_transport.cpp:41
erpc::RPMsgBaseTransport
Transport that other RPMsg transports inherits.
Definition: erpc_rpmsg_lite_base_transport.h:39
erpc::RPMsgRTOSTransport::hasMessage
virtual bool hasMessage(void)
Function to check if is message in receive queue and wait for processing.
Definition: erpc_rpmsg_lite_rtos_transport.h:115
erpc::RPMsgRTOSTransport::m_rpmsg_ept
struct rpmsg_lite_endpoint * m_rpmsg_ept
Definition: erpc_rpmsg_lite_rtos_transport.h:123
erpc::RPMsgRTOSTransport::m_rdev
struct remote_device * m_rdev
Definition: erpc_rpmsg_lite_rtos_transport.h:119
erpc::RPMsgRTOSTransport::m_app_rp_chnl
struct rpmsg_channel * m_app_rp_chnl
Definition: erpc_rpmsg_lite_rtos_transport.h:120