Ребята , помогите с дескриптором композитного аудио устройства.
пытаюсь сделать на AT89c5131.
дескриптор который нашол и переправил немного вот:
usb_configuration=
{
{ // Standard configuration descriptor
0x09, // bLength (9)
0x02, // bDescriptorType (CONFIGURATION)
0x9000, // wTotallength (144)
0x03, // bNumInterfaces (3)
0x01, // bConfigurationValue (1)
0x00, // iConfiguration (none)
0x80, // bmAttributes (bus-powered)
0x32, // bMaxPower (100 mA)
},
{ // Audio control interface
0x09, // bLength (9)
0x04, // bDescriptorType (INTERFACE)
0x00, // bInterfaceNumber (0)
0x00, // bAlternateSetting (none)
0x00, // bNumEndpoints (none)
0x01, // bInterfaceClass (AUDIO)
0x01, // bInterfaceSubClass (AUDIO_CONTROL)
0x00, // bInterfaceProtocol (none)
0x00 // iInterface (none)
},
{ // Audio class-specific interface header
0x09, // bLength (9)
0x24, // bDescriptorType (CS_INTERFACE)
0x01, // bDescriptorSubtype (HEADER)
0x0001, // bcdADC (1.0)
0x2A00, // wTotalLength (32)
0x01, // bInCollection (1 streaming interface)
0x01 // baInterfaceNr (interface 1 is stream)
},
{ // Audio class-specific input terminal
0x0A, // bLength (12)
0x24, // bDescriptorType (CS_INTERFACE)
0x01, // bDescriptorSubtype (INPUT_TERMINAL)
0x00, // bTerminalID (1)
0x017C, // wTerminalType (radio receiver)
0x00, // bAssocTerminal (none)
0x02, // bNrChannels (2)
0x01, // iChannelNames (none)
0x02 // iTerminal (none)
},
{ // Audio class-specific feature unit
0x0D, // bLength (13)
0x24, // bDescriptorType (CS_INTERFACE)
0x06, // bDescriptorSubtype (FEATURE_UNIT)
0x02, // bUnitID (2)
0x01, // bSourceID (input terminal 1)
0x02, // bControlSize (2 bytes)
0x0100, // Master controls
0x0000, // Channel 0 controls
0x0000, // Channel 1 controls
0x00 // iFeature (none)
},
{ // Audio class-specific output terminal
0x09, // bLength (9)
0x24, // bDescriptorType (CS_INTERFACE)
0x03, // bDescriptorSubtype (OUTPUT_TERMINAL)
0x03, // bTerminalID (3)
0x0101, // wTerminalType (USB streaming)
0x00, // bAssocTerminal (none)
0x02, // bSourceID (feature unit 2)
0x00 // iTerminal (none)
},
{ // Audio zero-bandwidth interface
0x09, // bLength (9)
0x04, // bDescriptorType (INTERFACE)
0x01, // bInterfaceNumber (1)
0x00, // bAlternateSetting (0)
0x00, // bNumEndpoints (0)
0x01, // bInterfaceClass (AUDIO)
0x02, // bInterfaceSubClass (AUDIO_STREAMING)
0x00, // bInterfaceProtocol (none)
0x00 // iInterface (none)
},
{ // Audio streaming interface (alternate)
0x09, // bLength (9)
0x04, // bDescriptorType (INTERFACE)
0x01, // bInterfaceNumber (1)
0x01, // bAlternateSetting (1)
0x01, // bNumEndpoints (1)
0x01, // bInterfaceClass (AUDIO)
0x02, // bInterfaceSubClass (AUDIO_STREAMING)
0x00, // bInterfaceProtocol (none)
0x00 // iInterface (none)
},
{ // Audio class-specific stream interface
0x07, // bLength (7)
0x24, // bDescriptorType (CS_INTERFACE)
0x01, // bDescriptorSubtype (AS_GENERAL)
0x03, // bTerminalLink (terminal 3)
0x00, // bDelay (none)
0x0100 // wFormatTag (PCM format)
},
{ // Audio class-specific type I format
0x0B, // bLength (11)
0x24, // bDescriptorType (CS_INTERFACE)
0x02, // bDescriptorSubtype (FORMAT_TYPE)
0x01, // bFormatType (TYPE_I)
0x02, // bNrChannels (2)
0x02, // bSubFrameSize (2)
// The next field should be 10, but 16 works with more standard software
0x0F, // bBitResolution (16)
0x01, // bSamFreqType (1 sampling frequency)
0x80, // 48,000 Hz (byte 0)
0xBB, // 48,000 Hz (byte 1)
0x00 // 48,000 Hz (byte 2)
},
{ // Audio streaming isochronous endpoint
0x09, // bLength (9)
0x05, // bDescriptorType (ENDPOINT)
0x83, // bEndpointAddress (EP3 in)
0x05, // bmAttributes (asynchronous)
0x0002, // wMaxPacketSize (512)
0x01, // bInterval (1 millisecond)
0x00, // bRefresh (0)
0x00 // bSynchAddress (no synchronization)
},
{ // Audio isochronous endpoint
0x07, // bLength (7)
0x25, // bDescriptorType (CS_ENDPOINT)
0x01, // bDescriptorSubtype (EP_GENERAL)
0x00, // bmAttributes (none)
0x02, // bLockDelayUnits (PCM samples)
0x0000 // wLockDelay (0)
},
{ // HID interface
0x09, // bLength (9)
0x04, // bDescriptorType (INTERFACE)
0x02, // bInterfaceNumber (2)
0x00, // bAlternateSetting (0)
0x02, // bNumEndpoints (2)
0x03, // bInterfaceClass (HID)
0x00, // bInterfaceSubClass (none)
0x00, // bInterfaceProtocol (none)
0x00 // iInterface (none)
},
{ // HID descriptor
0x09, // bLength (9)
0x21, // bDescriptorType (HID_DESCRIPTOR)
0x1101, // bcdHID (1.11)
0x00, // bCountryCode (none)
0x01, // bNumDescriptors (1 class descriptor)
0x22, // bClassDescriptorType (report descr.)
SIZE_OF_REPORT // wDescriptorLength (203)
},
{ // HID interrupt in endpoint
0x07, // bLength (7)
0x05, // bDescriptorType (ENDPOINT)
0x81, // bEndpointAddress (EP1 in)
0x03, // bmAttributes (interrupt)
0x2000, // wMaxPacketSize (32)
0x0A // bInterval (10 milliseconds)
},
{ // HID interrupt out endpoint
0x07, // bLength (7)
0x05, // bDescriptorType (ENDPOINT)
0x02, // bEndpointAddress (EP2 out)
0x03, // bmAttributes (interrupt)
0x2000, // wMaxPacketSize (32)
0x01 // bInterval (1 millisecond)
}
};
Может я че7го то не так понимаю?
Помогите плизъ!!!