message.h 845 B

123456789101112131415161718192021222324252627282930
  1. #ifndef __MESSAGE_H__
  2. #define __MESSAGE_H__
  3. /**
  4. ** @fn PostMsg
  5. ** @brief Post a message to the destination task.
  6. ** @param MsgPkt - Message to be posted.
  7. ** @param Queue - Queue to post this message to.
  8. ** @return 0 if success, -1 if failed.
  9. ***/
  10. int
  11. PostMsg (int fd, MsgPkt_T* pMsgPkt);
  12. /**
  13. * @fn GetMsg
  14. * @brief Gets the message posted to this task.
  15. * @param MsgPkt - Pointer to the buffer to hold the message packet.
  16. * @param Queue - Queue to fetch the message from.
  17. * @param Timeout - Number of seconds to wait.
  18. *
  19. * WAIT_NONE - If the function has to return immediately.
  20. * WAIT_INFINITE - If the function has to wait infinitely.
  21. * NOTE :
  22. * @return 0 if success, -1 if failed.
  23. **/
  24. int
  25. GetMsg (int fd, MsgPkt_T* pMsgPkt, int16_t Timeout);
  26. #endif /* __MESSAGE_H__ */