/*
LUFA Library
- Copyright (C) Dean Camera, 2012.
+ Copyright (C) Dean Camera, 2017.
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
/*
- Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com)
+ Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
- The author disclaim all warranties with regard to this
+ The author disclaims all warranties with regard to this
software, including all implied warranties of merchantability
and fitness. In no event shall the author be liable for any
special, indirect or consequential damages or any damages
/** \ingroup Group_USBClassAudio
* \defgroup Group_USBClassAudioHost Audio 1.0 Class Host Mode Driver
*
- * \section Sec_Dependencies Module Source Dependencies
+ * \section Sec_USBClassAudioHost_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
* - LUFA/Drivers/USB/Class/Host/AudioClassHost.c <i>(Makefile source module name: LUFA_SRC_USBCLASS)</i>
*
- * \section Sec_ModDescription Module Description
+ * \section Sec_USBClassAudioHost_ModDescription Module Description
* Host Mode USB Class driver framework interface, for the Audio 1.0 USB Class driver.
*
* @{
*/
typedef struct
{
- const struct
+ struct
{
- uint8_t DataINPipeNumber; /**< Pipe number of the Audio interface's IN data pipe. If this interface should not
- * bind to an IN endpoint, this may be set to 0 to disable audio input streaming for
- * this driver instance.
- */
- uint8_t DataOUTPipeNumber; /**< Pipe number of the Audio interface's OUT data pipe. If this interface should not
- * bind to an OUT endpoint, this may be set to 0 to disable audio output streaming for
- * this driver instance.
- */
+ USB_Pipe_Table_t DataINPipe; /**< Data IN Pipe configuration table. */
+ USB_Pipe_Table_t DataOUTPipe; /**< Data OUT Pipe configuration table. */
} Config; /**< Config data for the USB class interface within the device. All elements in this section
* <b>must</b> be set or the interface will fail to enumerate and operate correctly.
*/
uint8_t StreamingInterfaceNumber; /**< Interface index of the Audio Streaming interface within the attached device. */
uint8_t EnabledStreamingAltIndex; /**< Alternative setting index of the Audio Streaming interface when the stream is enabled. */
-
- uint16_t DataINPipeSize; /**< Size in bytes of the Audio interface's IN data pipe. */
- uint16_t DataOUTPipeSize; /**< Size in bytes of the Audio interface's OUT data pipe. */
} State; /**< State data for the USB class interface within the device. All elements in this section
* <b>may</b> be set to initial values, but may also be ignored to default to sane values when
* the interface is enumerated.
* send and/or received.
*
* \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class host configuration and state.
- * \param[in] EnableStreaming Boolean true to enable streaming of the specified interface, false to disable
+ * \param[in] EnableStreaming Boolean true to enable streaming of the specified interface, \c false to disable
*
* \return A value from the \ref USB_Host_SendControlErrorCodes_t enum.
*/
bool SampleReceived = false;
- Pipe_SelectPipe(AudioInterfaceInfo->Config.DataINPipeNumber);
+ Pipe_SelectPipe(AudioInterfaceInfo->Config.DataINPipe.Address);
Pipe_Unfreeze();
SampleReceived = Pipe_IsINReceived();
Pipe_Freeze();
if ((USB_HostState != HOST_STATE_Configured) || !(AudioInterfaceInfo->State.IsActive))
return false;
- Pipe_SelectPipe(AudioInterfaceInfo->Config.DataOUTPipeNumber);
+ Pipe_SelectPipe(AudioInterfaceInfo->Config.DataOUTPipe.Address);
return Pipe_IsOUTReady();
}