X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/8b5aa616013811faf53fb5c1f2fdb819dd671b36..e7670d06e0724fc03c743b8f24251e6d25e2b4d6:/LUFA/Drivers/USB/Class/Host/AudioClassHost.h
diff --git a/LUFA/Drivers/USB/Class/Host/AudioClassHost.h b/LUFA/Drivers/USB/Class/Host/AudioClassHost.h
index 1940c0de5..2d39aa9ca 100644
--- a/LUFA/Drivers/USB/Class/Host/AudioClassHost.h
+++ b/LUFA/Drivers/USB/Class/Host/AudioClassHost.h
@@ -1,13 +1,13 @@
 /*
              LUFA Library
-     Copyright (C) Dean Camera, 2011.
+     Copyright (C) Dean Camera, 2012.
 
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
 */
 
 /*
-  Copyright 2011  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+  Copyright 2012  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
@@ -77,16 +77,10 @@
 			 */
 			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
 				           *   must be set or the interface will fail to enumerate and operate correctly.
 				           */
@@ -98,11 +92,8 @@
 					                */
 					uint8_t ControlInterfaceNumber; /**< Interface index of the Audio Control interface within the attached device. */
 					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. */
+					uint8_t EnabledStreamingAltIndex; /**< Alternative setting index of the Audio Streaming interface when the stream is enabled. */
 				} State; /**< State data for the USB class interface within the device. All elements in this section
 						  *   may be set to initial values, but may also be ignored to default to sane values when
 						  *   the interface is enumerated.
@@ -201,7 +192,7 @@
 
 				bool SampleReceived = false;
 
-				Pipe_SelectPipe(AudioInterfaceInfo->Config.DataINPipeNumber);
+				Pipe_SelectPipe(AudioInterfaceInfo->Config.DataINPipe.Address);
 				Pipe_Unfreeze();
 				SampleReceived = Pipe_IsINReceived();
 				Pipe_Freeze();
@@ -226,7 +217,7 @@
 				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();
 			}
 
@@ -331,7 +322,7 @@
 			                                           const int8_t Sample)
 			{
 				(void)AudioInterfaceInfo;
-			
+
 				Pipe_Write_8(Sample);
 
 				if (!(Pipe_IsReadWriteAllowed()))
@@ -357,7 +348,7 @@
 			                                            const int16_t Sample)
 			{
 				(void)AudioInterfaceInfo;
-			
+
 				Pipe_Write_16_LE(Sample);
 
 				if (!(Pipe_IsReadWriteAllowed()))
@@ -395,7 +386,7 @@
 					Pipe_Freeze();
 				}
 			}
-			
+
 	/* Private Interface - For use in library only: */
 	#if !defined(__DOXYGEN__)
 		/* Function Prototypes: */