task_msg_bus_def.h 930 B

1234567891011121314151617181920212223242526272829303132333435
  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_release_hooks
  17. #error "Please define 'task_msg_release_hooks' in the header file:'task_msg_bus_user_def.h"
  18. #endif
  19. #endif
  20. #else
  21. enum task_msg_name{
  22. TASK_MSG_OS_REDAY = 0,
  23. TASK_MSG_NET_REDAY,
  24. TASK_MSG_COUNT
  25. };
  26. #ifdef TASK_MSG_USING_DYNAMIC_MEMORY
  27. #define task_msg_release_hooks {\
  28. {TASK_MSG_OS_REDAY, RT_NULL}, \
  29. {TASK_MSG_NET_REDAY, RT_NULL}, \
  30. }
  31. #endif
  32. #endif
  33. #endif /* TASK_MSG_BUS_DEF_H_ */