eRPC API Reference  Rev. 1.12.0
NXP Semiconductors
erpc_rpmsg_lite_base.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_H_
12 #define _EMBEDDED_RPC__RPMSG_LITE_BASE_H_
13 
14 #include "erpc_config_internal.h"
15 
16 extern "C" {
17 #include "rpmsg_env_specific.h"
18 #include "rpmsg_lite.h"
19 }
20 
21 #if ERPC_ALLOCATION_POLICY == ERPC_ALLOCATION_POLICY_STATIC
22 #ifndef RL_USE_STATIC_API
23 #warning "RPMSG is not set to use static allocation"
24 #endif
25 #endif
26 
34 // Definitions
37 
39 // Classes
41 
42 namespace erpc {
49 class RPMsgBase
50 {
51 public:
52  RPMsgBase(void){};
53 
54  virtual ~RPMsgBase(void) {}
55 
61  struct rpmsg_lite_instance *get_rpmsg_lite_instance(void) { return s_rpmsg; }
62 
63 protected:
64  static struct rpmsg_lite_instance *s_rpmsg;
65  static uint8_t s_initialized;
66 #if RL_USE_STATIC_API
67  struct rpmsg_lite_instance m_static_context;
68  struct rpmsg_lite_ept_static_context
69  m_ept_context;
70 #ifdef RL_ENV_QUEUE_STATIC_STORAGE_SIZE
71  rpmsg_static_queue_ctxt
72  m_queue_context;
73  uint8_t m_queue_stack[RL_ENV_QUEUE_STATIC_STORAGE_SIZE];
75 #endif /* RL_ENV_QUEUE_STATIC_STORAGE_SIZE */
76 #endif
77 };
78 
79 } // namespace erpc
80 
83 #endif // _EMBEDDED_RPC__RPMSG_LITE_BASE_H_
Definition: erpc_arbitrated_client_manager.hpp:25
struct rpmsg_lite_instance * get_rpmsg_lite_instance(void)
This function returns pointer to instance of RPMSG lite.
Definition: erpc_rpmsg_lite_base.hpp:61
Transport that other RPMsg transports inherits.
Definition: erpc_rpmsg_lite_base.hpp:49
static uint8_t s_initialized
Definition: erpc_rpmsg_lite_base.hpp:65
static struct rpmsg_lite_instance * s_rpmsg
Definition: erpc_rpmsg_lite_base.hpp:64