29 { .Size =
sizeof(USB_Descriptor_Device_t), .Type =
DTYPE_Device },
31 .USBSpecification = VERSION_BCD( 01.10 ),
36 .Endpoint0Size = USB_DEF_EP0_SIZE,
38 .VendorID = USB_DEF_VID,
39 .ProductID = USB_DEF_PID,
40 .ReleaseNumber = VERSION_BCD( 00.01 ),
42 .ManufacturerStrIndex = 0x01,
43 .ProductStrIndex = 0x02,
44 .SerialNumStrIndex = USE_INTERNAL_SERIAL,
46 .NumberOfConfigurations = 1 };
61 .ConfigurationNumber = 1,
62 .ConfigurationStrIndex = NO_DESCRIPTOR,
64 .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
66 .MaxPowerConsumption = USB_CONFIG_POWER_MA( 100 ) },
70 { .Size =
sizeof(USB_Descriptor_Interface_t), .Type =
DTYPE_Interface },
73 .AlternateSetting = 0,
81 .InterfaceStrIndex = NO_DESCRIPTOR },
83 .CDC_Functional_Header =
85 { .Size =
sizeof(USB_CDC_Descriptor_FunctionalHeader_t), .Type =
DTYPE_CSInterface },
88 .CDCSpecification = VERSION_BCD( 01.10 ), },
92 { .Size =
sizeof(USB_CDC_Descriptor_FunctionalACM_t), .Type =
DTYPE_CSInterface },
95 .Capabilities = 0x06, },
97 .CDC_Functional_Union =
99 { .Size =
sizeof(USB_CDC_Descriptor_FunctionalUnion_t), .Type =
DTYPE_CSInterface },
102 .MasterInterfaceNumber = 0, .SlaveInterfaceNumber = 1, },
104 .CDC_NotificationEndpoint =
106 { .Size =
sizeof(USB_Descriptor_Endpoint_t), .Type =
DTYPE_Endpoint },
109 .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
114 { .Size =
sizeof(USB_Descriptor_Interface_t), .Type =
DTYPE_Interface },
116 .InterfaceNumber = 1,
117 .AlternateSetting = 0,
125 .InterfaceStrIndex = NO_DESCRIPTOR },
127 .CDC_DataOutEndpoint =
129 { .Size =
sizeof(USB_Descriptor_Endpoint_t), .Type =
DTYPE_Endpoint },
132 .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
134 .PollingIntervalMS = 0x01 },
136 .CDC_DataInEndpoint =
138 { .Size =
sizeof(USB_Descriptor_Endpoint_t), .Type =
DTYPE_Endpoint },
141 .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
143 .PollingIntervalMS = 0x01 } };
154 { LANGUAGE_ID_ENG } };
164 .UnicodeString = L
"woodym" };
174 .UnicodeString = L
"CNC Controller" };
183 const uint8_t wIndex,
const void**
const DescriptorAddress )
185 const uint8_t DescriptorType = (wValue >> 8);
186 const uint8_t DescriptorNumber = (wValue & 0xFF);
188 const void* Address = NULL;
189 uint16_t Size = NO_DESCRIPTOR;
191 switch (DescriptorType)
195 Size =
sizeof(USB_Descriptor_Device_t);
202 switch (DescriptorNumber)
221 *DescriptorAddress = Address;
Bibliothek zur USB-Kommunikation von Jürgen W.
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor
const USB_Descriptor_String_t PROGMEM ProductString
const USB_Descriptor_Device_t PROGMEM DeviceDescriptor
const USB_Descriptor_String_t PROGMEM LanguageString
#define CDC_NOTIFICATION_EPSIZE
#define CDC_NOTIFICATION_EPADDR
const USB_Descriptor_String_t PROGMEM ManufacturerString
Bibliothek zur USB-Kommunikation von Jürgen W.
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, const void **const DescriptorAddress)