rpmsg_env_specific.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Copyright 2021-2023 NXP
  3. * All rights reserved.
  4. *
  5. *
  6. * SPDX-License-Identifier: BSD-3-Clause
  7. */
  8. /**************************************************************************
  9. * FILE NAME
  10. *
  11. * rpmsg_env_specific.h
  12. *
  13. * DESCRIPTION
  14. *
  15. * This file contains FreeRTOS specific constructions.
  16. *
  17. **************************************************************************/
  18. #ifndef RPMSG_ENV_SPECIFIC_H_
  19. #define RPMSG_ENV_SPECIFIC_H_
  20. #include <stdint.h>
  21. #include "rpmsg_default_config.h"
  22. typedef struct
  23. {
  24. uint32_t src;
  25. void *data;
  26. uint32_t len;
  27. } rpmsg_queue_rx_cb_data_t;
  28. #if defined(RL_USE_STATIC_API) && (RL_USE_STATIC_API == 1)
  29. #include "FreeRTOS.h"
  30. #if (configSUPPORT_STATIC_ALLOCATION == 0)
  31. #warning You have configured RPMsg_Lite to use static API but FreeRTOS is not configured for static allocations! Please switch the configSUPPORT_STATIC_ALLOCATION to 1 in your FreeRTOSConfig.h file.
  32. #endif
  33. typedef StaticSemaphore_t LOCK_STATIC_CONTEXT;
  34. typedef StaticQueue_t rpmsg_static_queue_ctxt;
  35. /* Queue object static storage size in bytes, should be defined as (2*RL_BUFFER_COUNT*sizeof(rpmsg_queue_rx_cb_data_t))
  36. This macro helps the application to statically allocate the queue object static storage memory. Note, the
  37. RL_BUFFER_COUNT is not applied for all instances when RL_ALLOW_CUSTOM_SHMEM_CONFIG is set to 1 ! */
  38. #define RL_ENV_QUEUE_STATIC_STORAGE_SIZE (2 * RL_BUFFER_COUNT * sizeof(rpmsg_queue_rx_cb_data_t))
  39. #endif
  40. #endif /* RPMSG_ENV_SPECIFIC_H_ */