hpimsginit.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /******************************************************************************
  2. AudioScience HPI driver
  3. Copyright (C) 1997-2010 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 preparing
  19. a response to a message.
  20. However, when sending a message, a matching response buffer always must be prepared
  21. */
  22. void hpi_init_response(struct hpi_response *phr, u16 object, u16 function,
  23. u16 error);
  24. void hpi_init_message_response(struct hpi_message *phm,
  25. struct hpi_response *phr, u16 object, u16 function);
  26. void hpi_init_responseV1(struct hpi_response_header *phr, u16 size,
  27. u16 object, u16 function);
  28. void hpi_init_message_responseV1(struct hpi_message_header *phm, u16 msg_size,
  29. struct hpi_response_header *phr, u16 res_size, u16 object,
  30. u16 function);