Коды того, какие значения могут принимать?
(«Телесистемы»: Конференция «Микроконтроллеры и их применение»)

миниатюрный аудио-видеорекордер mAVR

Отправлено австро-венгр 22 ноября 2003 г. 17:30
В ответ на: Дак тож про реквесты речь идет, а мне надо дискриптор. отправлено a123 22 ноября 2003 г. 16:40

typedef struct _usb100_device_descriptor {
USB100_FIELD( bLength, _uint8);
USB100_FIELD( bDescriptorType, _uint8);
USB100_FIELD( bcdUSB, _uint16);
USB100_FIELD( bDeviceClass, _uint8);
USB100_FIELD( bDeviceSubClass, _uint8);
USB100_FIELD( bDeviceProtocol, _uint8);
USB100_FIELD( bMaxPacketSize0, _uint8);
USB100_FIELD( idVendor, _uint16);
USB100_FIELD( idProduct, _uint16);
USB100_FIELD( bcdDevice, _uint16);
USB100_FIELD( iManufacturer, _uint8);
USB100_FIELD( iProduct, _uint8);
USB100_FIELD( iSerialNumber, _uint8);
USB100_FIELD( bNumConfigurations, _uint8);
} usb100_device_descriptor_t;

typedef struct _usb100_configuration_descriptor {
USB100_FIELD( bLength, _uint8);
USB100_FIELD( bDescriptorType, _uint8);
USB100_FIELD( wTotalLength, _uint16);
USB100_FIELD( bNumInterfaces, _uint8);
USB100_FIELD( bConfigurationValue, _uint8);
USB100_FIELD( iConfiguration, _uint8);
USB100_FIELD( bmAttributes, _uint8);
USB100_FIELD( MaxPower, _uint8);
} usb100_configuration_descriptor_t;

typedef struct _usb100_string_descriptor {
USB100_FIELD( bLength, _uint8);
USB100_FIELD( bDescriptorType, _uint8);
USB100_FIELD( bString, _uint16[1]);
} usb100_string_descriptor_t;

typedef struct _usb100_interface_descriptor {
USB100_FIELD( bLength, _uint8);
USB100_FIELD( bDescriptorType, _uint8);
USB100_FIELD( bInterfaceNumber, _uint8);
USB100_FIELD( bAlternateSetting, _uint8);
USB100_FIELD( bNumEndpoints, _uint8);
USB100_FIELD( bInterfaceClass, _uint8);
USB100_FIELD( bInterfaceSubClass, _uint8);
USB100_FIELD( bInterfaceProtocol, _uint8);
USB100_FIELD( iInterface, _uint8);
} usb100_interface_descriptor_t;

typedef struct _usb100_endpoint_descriptor {
USB100_FIELD( bLength, _uint8);
USB100_FIELD( bDescriptorType, _uint8);
USB100_FIELD( bEndpointAddress, _uint8);
USB100_FIELD( bmAttributes, _uint8);
USB100_FIELD( wMaxPacketSize, _uint16);
USB100_FIELD( bInterval, _uint8);
} usb100_endpoint_descriptor_t;

typedef struct _usb100_audio_endpoint_descriptor {
USB100_FIELD( bLength, _uint8);
USB100_FIELD( bDescriptorType, _uint8);
USB100_FIELD( bEndpointAddress, _uint8);
USB100_FIELD( bmAttributes, _uint8);
USB100_FIELD( wMaxPacketSize, _uint16);
USB100_FIELD( bInterval, _uint8);
USB100_FIELD( bRefresh, _uint8);
USB100_FIELD( bSyncAddress, _uint8);
} usb100_audio_endpoint_descriptor_t;

typedef struct _usb100_hid_descriptor {
USB100_FIELD( bLength, _uint8);
USB100_FIELD( bDescriptorType, _uint8);
USB100_FIELD( bcdHID, _uint16);
USB100_FIELD( bCountryCode, _uint8);
USB100_FIELD( bNumDescriptors, _uint8);
USB100_FIELD( bReportDescriptorType, _uint8);
USB100_FIELD( wDescriptorLength, _uint16);
} usb100_hid_descriptor_t;

typedef struct _usb100_hub_descriptor {
USB100_FIELD( bLength, _uint8);
USB100_FIELD( bDescriptorType, _uint8);
USB100_FIELD( bNbrPorts, _uint8);
USB100_FIELD( wHubCharacteristics, _uint16);
USB100_FIELD( bPwrOn2PwrGood, _uint8);
USB100_FIELD( bHubContrCurrent, _uint8);
USB100_FIELD( DeviceRemovable, _uint8[1]);
USB100_FIELD( PortPwrCtrlMask, _uint8[1]);
} usb100_hub_descriptor_t;



Составить ответ  |||  Конференция  |||  Архив

Ответы



Перейти к списку ответов  |||  Конференция  |||  Архив  |||  Главная страница  |||  Содержание  |||  Без кадра

E-mail: info@telesys.ru