[an error occurred while processing this directive] [an error occurred while processing this directive]
Ответ:
(«Телесистемы»: Конференция «Микроконтроллеры и их применение»)
[an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive]

Отправлено Borman 24 октября 2001 г. 13:52
В ответ на: ээ.. а можно дескрипторы посмотреть? отправлено Диман 24 октября 2001 г. 12:39


const u8_t DeviceDesc[] =
{
0x12, // Size of this Descriptor in Bytes
DT_DEVICE, // Descriptor Type (=1)
0x10, 0x01, // USB Spec Release Number in BCD = 1.10
0, // Device Class Code (none)
0, // Device Subclass Code (none)
0, // Device Protocol Code (none)
8, // Maximum Packet Size for EP0
0x70, 0x0c, // Vendor ID = MCT Elektronikladen
0x01, 0x00, // Product ID = Generic Demo [0,0]
0x00, 0x01, // Device Release Number in BCD
0, // Index of String Desc for Manufacturer[1]
0, // Index of String Desc for Product [2]
0, // Index of String Desc for SerNo
1 // Number of possible Configurations
};

//----------------------------------------------------------------------------

const u8_t ConfigDesc[] =
{
9, // Size of this Descriptor in Bytes
DT_CONFIGURATION, // Descriptor Type (=2)
9+9+7+7, 0x00, // Total Length of Data for this Conf
1, // No of Interfaces supported by this Conf
1, // Designator Value for *this* Configuration
0, // Index of String Desc for this Conf
0x80, // Bus-powered, no Remote-Wakeup
50, // Max. Power Consumption in this Conf (*2mA)

//----------------------------------------------------------------------------

//u8_t InterfaceDesc[] = {

9, // Size of this Descriptor in Bytes
DT_INTERFACE, // Descriptor Type (=4)
0, // Number of *this* Interface (0..)
0, // Alternative for this Interface (if any)
2, // No of EPs used by this IF (excl. EP0)
0xff, // IF Class Code (0xff = Vendor specific)
0x01, // Interface Subclass Code
0xff, // IF Protocol Code (0xff = Vendor specific)
0, // Index of String Desc for this Interface

//----------------------------------------------------------------------------

//u8_t Endpoint1Desc[] = {

7, // Size of this Descriptor in Bytes
DT_ENDPOINT, // Descriptor Type (=5)
0x81, // Endpoint Address (EP1, IN)
0x03, // Interrupt
0x40, 0x00, // Max. Endpoint Packet Size
10, // Polling Interval (Interrupt) in ms

//----------------------------------------------------------------------------

//u8_t Endpoint2Desc[] = {

7, // Size of this Descriptor in Bytes
DT_ENDPOINT, // Descriptor Type (=5)
0x02, // Endpoint Address (EP2, OUT)
0x03, // Interrupt
0x40, 0x00, // Max. Endpoint Packet Size
10 // Polling Interval (Interrupt) in ms

};


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

Ответы



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

E-mail: info@telesys.ru