# Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

### Protego

# MLA -- USB Library

20 December, 2013

- 1
- 2
…
- 94
- 95
- 96
- 97
- 98
…
- 311
- 312

1.4.1.6 Vendor Class (Generic) Function Driver
Files
Name Description
usb_device_generic.h This is file usb_device_generic.h.
Description
1.4.1.6.1 Functions
Functions
Name Description
USBCheckVendorRequest This routine handles vendor class specific requests that happen on EP0.
This function should be called from the USBCBCheckOtherReq() call
back function whenever implementing a custom/vendor class device.
Macros
Name Description
USBGEN_H This is macro USBGEN_H.
USBGenRead Receives the specified data out the specified endpoint
USBGenWrite Sends the specified data out the specified endpoint
Module
Vendor Class (Generic) Function Driver
Description
1.4.1.6.1.1 USBCheckVendorRequest Function
This routine handles vendor class specific requests that happen on EP0. This function should be called from the
USBCBCheckOtherReq() call back function whenever implementing a custom/vendor class device.
File
usb_device_generic.h
Syntax
void USBCheckVendorRequest();
Description
This routine handles vendor specific requests that may arrive on EP0 as a control transfer. These can include, but are not
necessarily limited to, requests for Microsft specific OS feature descriptor(s). This function should be called from the
USBCBCheckOtherReq() call back function whenever using a vendor class device.
Typical Usage:
void USBCBCheckOtherReq(void)
{
//Since the stack didn't handle the request I need to check
// my class drivers to see if it is for them
USBCheckVendorRequest();
}
Remarks
This function normally gets called within the same context as the USBDeviceTasks() function, just after a new control
1.4 Library Interface MLA - USB Library Help Device/Peripheral
96

- 1
- 2
…
- 94
- 95
- 96
- 97
- 98
…
- 311
- 312