![]() |
LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
|
Go to the source code of this file.
Data Structures | |
struct | USB_ClassInfo_Audio_Host_t |
Audio Class Host Mode Configuration and State Structure. More... | |
Functions | |
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) |
Host interface configuration routine, to configure a given Audio host interface instance using the Configuration Descriptor read from an attached USB device. This function automatically updates the given Audio Host instance's state values and configures the pipes required to communicate with the interface if it is found within the device. This should be called once after the stack has enumerated the attached device, while the host state machine is in the Addressed state. | |
uint8_t | Audio_Host_StartStopStreaming (USB_ClassInfo_Audio_Host_t *const AudioInterfaceInfo, const bool EnableStreaming) ATTR_NON_NULL_PTR_ARG(1) |
Starts or stops the audio streaming for the given configured Audio Host interface, allowing for audio samples to be send and/or received. | |
uint8_t | Audio_Host_GetSetEndpointProperty (USB_ClassInfo_Audio_Host_t *const AudioInterfaceInfo, const uint8_t DataPipeIndex, const uint8_t EndpointProperty, const uint8_t EndpointControl, const uint16_t DataLength, void *const Data) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(6) |
Gets or sets the specified property of a streaming audio class endpoint that is bound to a pipe in the given class instance. | |
static void | Audio_Host_USBTask (USB_ClassInfo_Audio_Host_t *const AudioInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE |
General management task for a given Audio host class interface, required for the correct operation of the interface. This should be called frequently in the main program loop, before the master USB management task USB_USBTask(). | |
static bool | Audio_Host_IsSampleReceived (USB_ClassInfo_Audio_Host_t *const AudioInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE |
Determines if the given audio interface is ready for a sample to be read from it, and selects the streaming IN pipe ready for reading. | |
static bool | Audio_Host_IsReadyForNextSample (USB_ClassInfo_Audio_Host_t *const AudioInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE |
Determines if the given audio interface is ready to accept the next sample to be written to it, and selects the streaming OUT pipe ready for writing. | |
static int8_t | Audio_Host_ReadSample8 (USB_ClassInfo_Audio_Host_t *const AudioInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE |
Reads the next 8-bit audio sample from the current audio interface. | |
static int16_t | Audio_Host_ReadSample16 (USB_ClassInfo_Audio_Host_t *const AudioInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE |
Reads the next 16-bit audio sample from the current audio interface. | |
static int32_t | Audio_Host_ReadSample24 (USB_ClassInfo_Audio_Host_t *const AudioInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE |
Reads the next 24-bit audio sample from the current audio interface. | |
static void | Audio_Host_WriteSample8 (USB_ClassInfo_Audio_Host_t *const AudioInterfaceInfo, const int8_t Sample) ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE |
Writes the next 8-bit audio sample to the current audio interface. | |
static void | Audio_Host_WriteSample16 (USB_ClassInfo_Audio_Host_t *const AudioInterfaceInfo, const int16_t Sample) ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE |
Writes the next 16-bit audio sample to the current audio interface. | |
static void | Audio_Host_WriteSample24 (USB_ClassInfo_Audio_Host_t *const AudioInterfaceInfo, const int32_t Sample) ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE |
Writes the next 24-bit audio sample to the current audio interface. | |