eRPC API Reference  Rev. 1.12.0
NXP Semiconductors
erpc_rpmsg_tty_rtos_transport.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016, Freescale Semiconductor, Inc.
3  * Copyright 2020 NXP
4  * All rights reserved.
5  *
6  *
7  * SPDX-License-Identifier: BSD-3-Clause
8  */
9 
10 #ifndef _EMBEDDED_RPC__RPMSG_LITE_TTY_RTOS_TRANSPORT_H_
11 #define _EMBEDDED_RPC__RPMSG_LITE_TTY_RTOS_TRANSPORT_H_
12 
13 #include "erpc_crc16.hpp"
15 #include "erpc_message_buffer.hpp"
16 #include "erpc_rpmsg_lite_base.hpp"
17 
18 extern "C" {
19 #include "rpmsg_lite.h"
20 #include "rpmsg_queue.h"
21 }
22 
29 // Definitions
32 
34 // Classes
36 
37 namespace erpc {
45 {
46 public:
53 
57  virtual ~RPMsgTTYRTOSTransport(void);
58 
74  virtual erpc_status_t init(uint32_t src_addr, uint32_t dst_addr, void *base_address, uint32_t length,
75  uint32_t rpmsg_link_id);
76 
95  virtual erpc_status_t init(uint32_t src_addr, uint32_t dst_addr, void *base_address, uint32_t rpmsg_link_id,
96  void (*ready_cb)(void), char *nameservice_name);
97 
98 protected:
99  uint32_t m_dst_addr;
100  rpmsg_queue_handle m_rpmsg_queue;
101  struct rpmsg_lite_endpoint *m_rpmsg_ept;
105 
117  virtual erpc_status_t underlyingReceive(MessageBuffer *message, uint32_t size, uint32_t offset) override;
118 
130  virtual erpc_status_t underlyingSend(MessageBuffer *message, uint32_t size, uint32_t offset) override;
131 
142  virtual erpc_status_t underlyingReceive(uint8_t *data, uint32_t size) override;
143 
154  virtual erpc_status_t underlyingSend(const uint8_t *data, uint32_t size) override;
155 };
156 
157 } // namespace erpc
158 
161 #endif // _EMBEDDED_RPC__RPMSG_LITE_TTY_RTOS_TRANSPORT_H_
uint32_t m_dst_addr
Definition: erpc_rpmsg_tty_rtos_transport.hpp:99
Base class for framed transport layers.
Definition: erpc_framed_transport.hpp:56
Transport that uses RPMsg zero copy RTOS API for interprocessor messaging.
Definition: erpc_rpmsg_tty_rtos_transport.hpp:44
enum _erpc_status erpc_status_t
Type used for all status and error return values.
Definition: erpc_common.h:85
RPMsgTTYRTOSTransport(void)
Constructor.
Definition: erpc_rpmsg_tty_rtos_transport.cpp:32
virtual erpc_status_t underlyingSend(MessageBuffer *message, uint32_t size, uint32_t offset) override
Adds ability to framed transport to overwrite MessageBuffer when sending data.
Definition: erpc_rpmsg_tty_rtos_transport.cpp:239
struct rpmsg_lite_endpoint * m_rpmsg_ept
Definition: erpc_rpmsg_tty_rtos_transport.hpp:101
virtual erpc_status_t underlyingReceive(MessageBuffer *message, uint32_t size, uint32_t offset)
Adds ability to framed transport to overwrite MessageBuffer when receiving data.
Definition: erpc_framed_transport.cpp:177
virtual erpc_status_t underlyingReceive(MessageBuffer *message, uint32_t size, uint32_t offset) override
Adds ability to framed transport to overwrite MessageBuffer when receiving data.
Definition: erpc_rpmsg_tty_rtos_transport.cpp:259
Represents a memory buffer containing a message.
Definition: erpc_message_buffer.hpp:37
Definition: erpc_arbitrated_client_manager.hpp:25
Transport that other RPMsg transports inherits.
Definition: erpc_rpmsg_lite_base.hpp:49
rpmsg_queue_handle m_rpmsg_queue
Definition: erpc_rpmsg_tty_rtos_transport.hpp:100
virtual erpc_status_t underlyingSend(MessageBuffer *message, uint32_t size, uint32_t offset)
Adds ability to framed transport to overwrite MessageBuffer when sending data.
Definition: erpc_framed_transport.cpp:170
virtual ~RPMsgTTYRTOSTransport(void)
RPMsgRTOSTransport destructor.
Definition: erpc_rpmsg_tty_rtos_transport.cpp:37
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_tty_rtos_transport.cpp:70