rpmsg_env_specific.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 ThreadX 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. #include "tx_api.h"
  23. typedef struct
  24. {
  25. uint32_t src;
  26. void *data;
  27. uint32_t len;
  28. } rpmsg_queue_rx_cb_data_t;
  29. #if defined(RL_USE_STATIC_API) && (RL_USE_STATIC_API == 1)
  30. #include "tx_event_flags.h"
  31. typedef TX_SEMAPHORE LOCK_STATIC_CONTEXT;
  32. typedef TX_QUEUE rpmsg_static_queue_ctxt;
  33. /* Queue object static storage size in bytes, should be defined as (2*RL_BUFFER_COUNT*sizeof(rpmsg_queue_rx_cb_data_t))
  34. This macro helps the application to statically allocate the queue object static storage memory. Note, the
  35. RL_BUFFER_COUNT is not applied for all instances when RL_ALLOW_CUSTOM_SHMEM_CONFIG is set to 1 ! */
  36. #define RL_ENV_QUEUE_STATIC_STORAGE_SIZE (2 * RL_BUFFER_COUNT * sizeof(rpmsg_queue_rx_cb_data_t))
  37. #endif
  38. #endif /* RPMSG_ENV_SPECIFIC_H_ */