task_msg_bus_def.h 905 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Copyright (c) 2006-2020, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2020-03-22 sly_ant the first version
  9. */
  10. #ifndef TASK_MSG_BUS_DEF_H_
  11. #define TASK_MSG_BUS_DEF_H_
  12. #include <rtthread.h>
  13. #ifdef TASK_MSG_USER_DEF
  14. #include "task_msg_bus_user_def.h"
  15. #ifdef TASK_MSG_USING_DYNAMIC_MEMORY
  16. #ifndef task_msg_dup_release_hooks
  17. #error "Please define 'task_msg_dup_release_hooks' in the header file:'task_msg_bus_user_def.h"
  18. #endif
  19. #endif
  20. #else
  21. enum task_msg_name
  22. {
  23. TASK_MSG_OS_REDAY = 0,
  24. TASK_MSG_NET_REDAY,
  25. TASK_MSG_COUNT
  26. };
  27. #ifdef TASK_MSG_USING_DYNAMIC_MEMORY
  28. #define task_msg_dup_release_hooks { \
  29. {TASK_MSG_OS_REDAY, RT_NULL, RT_NULL}, \
  30. {TASK_MSG_NET_REDAY, RT_NULL, RT_NULL}, \
  31. }
  32. #endif
  33. #endif
  34. #endif /* TASK_MSG_BUS_DEF_H_ */