1 /**
2   ******************************************************************************
3   * @file   openamp.h
4   * @brief  Header for openamp applications
5   * @author  MCD Application Team
6   ******************************************************************************
7   * @attention
8   *
9   * <h2><center>&copy; Copyright (c) 2019 STMicroelectronics.
10   * All rights reserved.</center></h2>
11   *
12   * This software component is licensed by ST under BSD 3-Clause license,
13   * the "License"; You may not use this file except in compliance with the
14   * License. You may obtain a copy of the License at:
15   *                       opensource.org/licenses/BSD-3-Clause
16   *
17   ******************************************************************************
18   */
19 
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef __openamp_H
22 #define __openamp_H
23 #ifdef __cplusplus
24  extern "C" {
25 #endif
26 
27 #include "openamp/open_amp.h"
28 #include "openamp_conf.h"
29 
30 #define OPENAMP_send  rpmsg_send
31 #define OPENAMP_destroy_ept rpmsg_destroy_ept
32 
33 /* Initialize the openamp framework*/
34 int MX_OPENAMP_Init(int RPMsgRole, rpmsg_ns_bind_cb ns_bind_cb);
35 
36 /* Deinitialize the openamp framework*/
37 void OPENAMP_DeInit(void);
38 
39 /* Initialize the endpoint struct*/
40 void OPENAMP_init_ept(struct rpmsg_endpoint *ept);
41 
42 /* Create and register the endpoint */
43 int OPENAMP_create_endpoint(struct rpmsg_endpoint *ept, const char *name,
44                             uint32_t dest, rpmsg_ept_cb cb,
45                             rpmsg_ns_unbind_cb unbind_cb);
46 
47 /* Check for new rpmsg reception */
48 void OPENAMP_check_for_message(void);
49 
50 /* Wait loop on endpoint ready ( message dest address is know)*/
51 void OPENAMP_Wait_EndPointready(struct rpmsg_endpoint *rp_ept);
52 
53 #ifdef __cplusplus
54 }
55 #endif
56 #endif /*__openamp_H */
57 
58 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
59