| 312 | } |
| 313 | |
| 314 | void DevicePrivate::loadConfigurationDescriptor(USBDescriptorParser* parser, const USBDescriptor* const descriptor) |
| 315 | { |
| 316 | (void)descriptor; |
| 317 | |
| 318 | if (!parser->haveDescriptor(USB_DESCRIPTOR_TYPE_DEVICE)) { |
| 319 | throw std::runtime_error("Invalid descriptor data: missing parent device descriptor while loading configuration"); |
| 320 | } |
| 321 | |
| 322 | /* |
| 323 | * Clean the descriptor state. There shouldn't be any Interface or Endpoint |
| 324 | * descriptors while loading. |
| 325 | */ |
| 326 | parser->delDescriptor(USB_DESCRIPTOR_TYPE_INTERFACE); |
| 327 | parser->delDescriptor(USB_DESCRIPTOR_TYPE_ENDPOINT); |
| 328 | return; |
| 329 | } |
| 330 | |
| 331 | void DevicePrivate::loadInterfaceDescriptor(USBDescriptorParser* parser, const USBDescriptor* const descriptor) |
| 332 | { |
nothing calls this directly
no test coverage detected