eRPC API Reference  Rev. 1.11.0
NXP Semiconductors
erpc_rpmsg_lite_base_transport.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-2016, Freescale Semiconductor, Inc.
3  * Copyright 2016-2021 NXP
4  * Copyright 2021 ACRIOS Systems s.r.o.
5  * All rights reserved.
6  *
7  *
8  * SPDX-License-Identifier: BSD-3-Clause
9  */
10 
11 #ifndef _EMBEDDED_RPC__RPMSG_LITE_BASE_TRANSPORT_H_
12 #define _EMBEDDED_RPC__RPMSG_LITE_BASE_TRANSPORT_H_
13 
14 #include "erpc_config_internal.h"
15 #include "erpc_transport.hpp"
16 
17 extern "C" {
18 #include "rpmsg_lite.h"
19 #include "rpmsg_env_specific.h"
20 }
21 
22 #if ERPC_ALLOCATION_POLICY == ERPC_ALLOCATION_POLICY_STATIC
23 #ifndef RL_USE_STATIC_API
24 #warning "RPMSG is not set to use static allocation"
25 #endif
26 #endif
27 
35 // Definitions
38 
40 // Classes
42 
43 namespace erpc {
51 {
52 public:
53  RPMsgBaseTransport(void)
54  : Transport(){};
55 
56  virtual ~RPMsgBaseTransport(void) {}
57 
63  struct rpmsg_lite_instance *get_rpmsg_lite_instance(void) { return s_rpmsg; }
64 
65 protected:
66  static struct rpmsg_lite_instance *s_rpmsg;
67  static uint8_t s_initialized;
68 #if RL_USE_STATIC_API
69  struct rpmsg_lite_instance m_static_context;
70  struct rpmsg_lite_ept_static_context
71  m_ept_context;
72 #ifdef RL_ENV_QUEUE_STATIC_STORAGE_SIZE
73  rpmsg_static_queue_ctxt
74  m_queue_context;
75  uint8_t m_queue_stack[RL_ENV_QUEUE_STATIC_STORAGE_SIZE];
77 #endif /* RL_ENV_QUEUE_STATIC_STORAGE_SIZE */
78 #endif
79 };
80 
81 } // namespace erpc
82 
85 #endif // _EMBEDDED_RPC__RPMSG_LITE_BASE_TRANSPORT_H_
Abstract interface for transport layer.
Definition: erpc_transport.hpp:36
Transport(void)
Constructor.
Definition: erpc_transport.hpp:42
static uint8_t s_initialized
Definition: erpc_rpmsg_lite_base_transport.hpp:67
static struct rpmsg_lite_instance * s_rpmsg
Definition: erpc_rpmsg_lite_base_transport.hpp:66
Definition: erpc_arbitrated_client_manager.hpp:25
Transport that other RPMsg transports inherits.
Definition: erpc_rpmsg_lite_base_transport.hpp:50
struct rpmsg_lite_instance * get_rpmsg_lite_instance(void)
This function returns pointer to instance of RPMSG lite.
Definition: erpc_rpmsg_lite_base_transport.hpp:63