# 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
…
- 169
- 170
- 171
- 172
- 173
…
- 311
- 312

Syntax
bool USBHostHIDEventHandler(uint8_t address, USB_EVENT event, void * data, uint32_t size);
Description
This function is the event handler for this client driver. It is called by the host layer when various events occur.
Remarks
None
Preconditions
The device has been initialized.
Parameters
Parameters Description
uint8_t address Address of the device
USB_EVENT event Event that has occurred
void *data Pointer to data pertinent to the event
uint32_t size Size of the data
Return Values
Return Values Description
TRUE Event was handled
FALSE Event was not handled
Function
bool USBHostHIDEventHandler( uint8_t address, USB_EVENT event,
void *data, uint32_t size )
1.4.2.3.1.9 USBHostHIDInitialize Function
This function is the initialization routine for this client driver.
File
usb_host_hid.h
Syntax
bool USBHostHIDInitialize(uint8_t address, uint32_t flags, uint8_t clientDriverID);
Description
This function is the initialization routine for this client driver. It is called by the host layer when the USB device is being
enumerated.For a HID device we need to look into HID descriptor, interface descriptor and endpoint descriptor.
Remarks
None
Preconditions
None
Parameters
Parameters Description
uint8_t address Address of the new device
uint32_t flags Initialization flags
uint8_t clientDriverID Client driver identification for device requests
1.4 Library Interface MLA - USB Library Help Embedded Host API
171

- 1
- 2
…
- 169
- 170
- 171
- 172
- 173
…
- 311
- 312