hpimsginit.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /******************************************************************************
  2. AudioScience HPI driver
  3. Copyright (C) 1997-2011 AudioScience Inc. <support@audioscience.com>
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of version 2 of the GNU General Public License as
  6. published by the Free Software Foundation;
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program; if not, write to the Free Software
  13. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  14. Hardware Programming Interface (HPI) Utility functions
  15. (C) Copyright AudioScience Inc. 2007
  16. *******************************************************************************/
  17. /* Initialise response headers, or msg/response pairs.
  18. Note that it is valid to just init a response e.g. when a lower level is
  19. preparing a response to a message.
  20. However, when sending a message, a matching response buffer must always be
  21. prepared.
  22. */
  23. #ifndef _HPIMSGINIT_H_
  24. #define _HPIMSGINIT_H_
  25. void hpi_init_response(struct hpi_response *phr, u16 object, u16 function,
  26. u16 error);
  27. void hpi_init_message_response(struct hpi_message *phm,
  28. struct hpi_response *phr, u16 object, u16 function);
  29. void hpi_init_responseV1(struct hpi_response_header *phr, u16 size,
  30. u16 object, u16 function);
  31. void hpi_init_message_responseV1(struct hpi_message_header *phm, u16 msg_size,
  32. struct hpi_response_header *phr, u16 res_size, u16 object,
  33. u16 function);
  34. #endif /* _HPIMSGINIT_H_ */