openamp.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. /* Define to prevent recursive inclusion -------------------------------------*/
  20. #ifndef __openamp_H
  21. #define __openamp_H
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. #include "openamp/open_amp.h"
  26. #include "openamp_conf.h"
  27. #define OPENAMP_send rpmsg_send
  28. #define OPENAMP_destroy_ept rpmsg_destroy_ept
  29. /* Initialize the openamp framework*/
  30. int MX_OPENAMP_Init(int RPMsgRole, rpmsg_ns_bind_cb ns_bind_cb);
  31. /* Deinitialize the openamp framework*/
  32. void OPENAMP_DeInit(void);
  33. /* Initialize the endpoint struct*/
  34. void OPENAMP_init_ept(struct rpmsg_endpoint *ept);
  35. /* Create and register the endpoint */
  36. int OPENAMP_create_endpoint(struct rpmsg_endpoint *ept, const char *name,
  37. uint32_t dest, rpmsg_ept_cb cb,
  38. rpmsg_ns_unbind_cb unbind_cb);
  39. /* Check for new rpmsg reception */
  40. void OPENAMP_check_for_message(void);
  41. /* Wait loop on endpoint ready ( message dest address is know)*/
  42. void OPENAMP_Wait_EndPointready(struct rpmsg_endpoint *rp_ept);
  43. #ifdef __cplusplus
  44. }
  45. #endif
  46. #endif /*__openamp_H */
  47. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/