/*
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
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
- * - LUFA/Drivers/USB/Class/Host/Audio.c <i>(Makefile source module name: LUFA_SRC_USBCLASS)</i>
+ * - LUFA/Drivers/USB/Class/Host/AudioClassHost.c <i>(Makefile source module name: LUFA_SRC_USBCLASS)</i>
*
* \section Sec_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
*/
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. */
* device. This should be called once after the stack has enumerated the attached device, while the host state
* machine is in the Addressed state.
*
- * \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class host configuration and state.
- * \param[in] ConfigDescriptorSize Length of the attached device's Configuration Descriptor.
- * \param[in] DeviceConfigDescriptor Pointer to a buffer containing the attached device's Configuration Descriptor.
+ * \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class host configuration and state.
+ * \param[in] ConfigDescriptorSize Length of the attached device's Configuration Descriptor.
+ * \param[in] ConfigDescriptorData Pointer to a buffer containing the attached device's Configuration Descriptor.
*
* \return A value from the \ref AUDIO_Host_EnumerationFailure_ErrorCodes_t enum.
*/
uint8_t Audio_Host_ConfigurePipes(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,
uint16_t ConfigDescriptorSize,
- void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3);
+ void* ConfigDescriptorData) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3);
/** Starts or stops the audio streaming for the given configured Audio Host interface, allowing for audio samples to be
* send and/or received.
const int8_t Sample)
{
(void)AudioInterfaceInfo;
-
+
Pipe_Write_8(Sample);
if (!(Pipe_IsReadWriteAllowed()))
const int16_t Sample)
{
(void)AudioInterfaceInfo;
-
+
Pipe_Write_16_LE(Sample);
if (!(Pipe_IsReadWriteAllowed()))
Pipe_Freeze();
}
}
-
+
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Function Prototypes: */