![]() |
void AUDDSpeakerDriver_ConfigurationChangeHandler | ( | uint8_t | cfgnum | ) |
Invoked whenever the active configuration of device is changed by the host.
cfgnum | Configuration number. |
void AUDDSpeakerDriver_Initialize | ( | const USBDDriverDescriptors * | pDescriptors | ) |
Initializes an USB audio speaker device driver, as well as the underlying USB controller.
void AUDDSpeakerDriver_InterfaceSettingChangedHandler | ( | uint8_t | interface, | |
uint8_t | setting | |||
) |
Invoked whenever the active setting of an interface is changed by the host. Changes the status of the third LED accordingly.
interface | Interface number. | |
setting | Newly active setting. |
WEAK void AUDDSpeakerDriver_MuteChanged | ( | uint8_t | channel, | |
uint8_t | muted | |||
) |
Invoked when an audio channel get muted or unmuted. Mutes/unmutes the channel at the DAC level.
channel | Channel number that changed. | |
muted | Indicates the new mute status of the channel. |
uint8_t AUDDSpeakerDriver_Read | ( | void * | buffer, | |
uint32_t | length, | |||
TransferCallback | callback, | |||
void * | argument | |||
) |
Reads incoming audio data sent by the USB host into the provided buffer. When the transfer is complete, an optional callback function is invoked.
buffer | Pointer to the data storage buffer. | |
length | Size of the buffer in bytes. | |
callback | Optional callback function. | |
argument | Optional argument to the callback function. |
void AUDDSpeakerDriver_RequestHandler | ( | const USBGenericRequest * | request | ) |
Handles audio-specific USB requests sent by the host, and forwards standard ones to the USB device driver.
request | Pointer to a USBGenericRequest instance. |
WEAK void AUDDSpeakerDriver_StreamSettingChanged | ( | uint8_t | newSetting | ) |
Invoked when an audio streaming interface setting changed. Actually control streaming rate.
newSetting | New stream (interface) setting. |
{ &deviceDescriptor, (const USBConfigurationDescriptor *) &fsConfigurationDescriptors, &qualifierDescriptor, 0, 0, (const USBConfigurationDescriptor *) &hsConfigurationDescriptors, &qualifierDescriptor, 0, stringDescriptors, 4 }
List of descriptors required by an USB audio speaker device driver.
Definition at line 513 of file USBDDriverDescriptors.c.
const USBDeviceDescriptor deviceDescriptor |
{ sizeof(USBDeviceDescriptor), USBGenericDescriptor_DEVICE, USBDeviceDescriptor_USB2_00, AUDDeviceDescriptor_CLASS, AUDDeviceDescriptor_SUBCLASS, AUDDeviceDescriptor_PROTOCOL, CHIP_USB_ENDPOINTS_MAXPACKETSIZE(0), AUDDSpeakerDriverDescriptors_VENDORID, AUDDSpeakerDriverDescriptors_PRODUCTID, AUDDSpeakerDriverDescriptors_RELEASE, 1, 2, 3, 1 }
Device descriptor for a USB audio speaker driver.
Definition at line 98 of file USBDDriverDescriptors.c.
const USBDeviceDescriptor deviceDescriptor |
{ sizeof(USBDeviceDescriptor), USBGenericDescriptor_DEVICE, USBDeviceDescriptor_USB2_00, AUDDeviceDescriptor_CLASS, AUDDeviceDescriptor_SUBCLASS, AUDDeviceDescriptor_PROTOCOL, CHIP_USB_ENDPOINTS_MAXPACKETSIZE(0), AUDDSpeakerDriverDescriptors_VENDORID, AUDDSpeakerDriverDescriptors_PRODUCTID, AUDDSpeakerDriverDescriptors_RELEASE, 1, 2, 3, 1 }
Device descriptor for a USB audio speaker driver.
Definition at line 77 of file USBDDriverDescriptors.c.
const AUDDSpeakerDriverConfigurationDescriptors fsConfigurationDescriptors |
Configuration descriptors for a USB audio speaker driver.
Definition at line 131 of file USBDDriverDescriptors.c.
const HidAuddDriverConfigurationDescriptors fsConfigurationDescriptors |
Configuration descriptors for a USB HID(keyboard) + Audio(speaker) driver.
Definition at line 110 of file USBDDriverDescriptors.c.
{ &deviceDescriptor, (const USBConfigurationDescriptor *) &fsConfigurationDescriptors, &qualifierDescriptor, 0, 0, (const USBConfigurationDescriptor *) &hsConfigurationDescriptors, &qualifierDescriptor, 0, stringDescriptors, 4 }
List of descriptors required by an USB audio speaker device driver.
Definition at line 605 of file USBDDriverDescriptors.c.
const AUDDSpeakerDriverConfigurationDescriptors hsConfigurationDescriptors |
Configuration descriptors for a USB audio speaker driver.
Definition at line 289 of file USBDDriverDescriptors.c.
const HidAuddDriverConfigurationDescriptors hsConfigurationDescriptors |
Configuration descriptors for a USB HID(keyboard) + Audio(speaker) driver.
Definition at line 325 of file USBDDriverDescriptors.c.
const unsigned char languageIdDescriptor[] |
{ USBStringDescriptor_LENGTH(1), USBGenericDescriptor_STRING, USBStringDescriptor_ENGLISH_US }
String descriptor with the supported languages.
Definition at line 447 of file USBDDriverDescriptors.c.
const unsigned char languageIdDescriptor[] |
{ USBStringDescriptor_LENGTH(1), USBGenericDescriptor_STRING, USBStringDescriptor_ENGLISH_US }
String descriptor with the supported languages.
Definition at line 540 of file USBDDriverDescriptors.c.
const unsigned char manufacturerDescriptor[] |
{ USBStringDescriptor_LENGTH(5), USBGenericDescriptor_STRING, USBStringDescriptor_UNICODE('A'), USBStringDescriptor_UNICODE('t'), USBStringDescriptor_UNICODE('m'), USBStringDescriptor_UNICODE('e'), USBStringDescriptor_UNICODE('l') }
Manufacturer name.
Definition at line 548 of file USBDDriverDescriptors.c.
const unsigned char manufacturerDescriptor[] |
{ USBStringDescriptor_LENGTH(5), USBGenericDescriptor_STRING, USBStringDescriptor_UNICODE('A'), USBStringDescriptor_UNICODE('t'), USBStringDescriptor_UNICODE('m'), USBStringDescriptor_UNICODE('e'), USBStringDescriptor_UNICODE('l') }
Manufacturer name.
Definition at line 455 of file USBDDriverDescriptors.c.
const unsigned char productDescriptor[] |
{ USBStringDescriptor_LENGTH(14), USBGenericDescriptor_STRING, USBStringDescriptor_UNICODE('K'), USBStringDescriptor_UNICODE('e'), USBStringDescriptor_UNICODE('y'), USBStringDescriptor_UNICODE('p'), USBStringDescriptor_UNICODE('a'), USBStringDescriptor_UNICODE('d'), USBStringDescriptor_UNICODE('&'), USBStringDescriptor_UNICODE('s'), USBStringDescriptor_UNICODE('p'), USBStringDescriptor_UNICODE('e'), USBStringDescriptor_UNICODE('a'), USBStringDescriptor_UNICODE('k'), USBStringDescriptor_UNICODE('e'), USBStringDescriptor_UNICODE('r') }
Product name.
Definition at line 560 of file USBDDriverDescriptors.c.
const unsigned char productDescriptor[] |
{ USBStringDescriptor_LENGTH(15), USBGenericDescriptor_STRING, USBStringDescriptor_UNICODE('D'), USBStringDescriptor_UNICODE('e'), USBStringDescriptor_UNICODE('s'), USBStringDescriptor_UNICODE('k'), USBStringDescriptor_UNICODE('t'), USBStringDescriptor_UNICODE('o'), USBStringDescriptor_UNICODE('p'), USBStringDescriptor_UNICODE(' '), USBStringDescriptor_UNICODE('s'), USBStringDescriptor_UNICODE('p'), USBStringDescriptor_UNICODE('e'), USBStringDescriptor_UNICODE('a'), USBStringDescriptor_UNICODE('k'), USBStringDescriptor_UNICODE('e'), USBStringDescriptor_UNICODE('r') }
Product name.
Definition at line 467 of file USBDDriverDescriptors.c.
const unsigned char serialNumberDescriptor[] |
{ USBStringDescriptor_LENGTH(4), USBGenericDescriptor_STRING, USBStringDescriptor_UNICODE('0'), USBStringDescriptor_UNICODE('1'), USBStringDescriptor_UNICODE('2'), USBStringDescriptor_UNICODE('3') }
Product serial number.
Definition at line 489 of file USBDDriverDescriptors.c.
const unsigned char serialNumberDescriptor[] |
{ USBStringDescriptor_LENGTH(4), USBGenericDescriptor_STRING, USBStringDescriptor_UNICODE('0'), USBStringDescriptor_UNICODE('1'), USBStringDescriptor_UNICODE('2'), USBStringDescriptor_UNICODE('3') }
Product serial number.
Definition at line 581 of file USBDDriverDescriptors.c.
const unsigned char* stringDescriptors[] |
Array of pointers to the four string descriptors.
Definition at line 500 of file USBDDriverDescriptors.c.
const unsigned char* stringDescriptors[] |
Array of pointers to the four string descriptors.
Definition at line 592 of file USBDDriverDescriptors.c.