# 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
…
- 164
- 165
- 166
- 167
- 168
…
- 311
- 312

USBHostHIDResetDeviceWithWait This function resets a HID device, and waits until the reset is
complete.
USBHostHIDTasks This function performs the maintenance tasks required by HID class
USBHostHIDTerminateTransfer This function terminates a transfer that is in progress.
USBHostHIDTransfer This function starts a HID transfer.
USBHostHIDTransferIsComplete This function indicates whether or not the last transfer is complete.
Macros
Name Description
USBHostHID_ApiDeviceDetect This macro provides legacy support for an older API function.
USBHostHID_ApiGetReport This macro provides legacy support for an older API function.
USBHostHID_ApiResetDevice This macro provides legacy support for an older API function.
USBHostHID_ApiSendReport This macro provides legacy support for an older API function.
USBHostHID_ApiTransferIsComplete This macro provides legacy support for an older API function.
USBHostHID_GetCurrentReportInfo This function returns a pointer to the current report info structure.
USBHostHID_GetItemListPointers This function returns a pointer to list of item pointers stored in a structure.
USBHostHIDRead This function starts a Get report transfer reuest from the device, utilizing
the function USBHostHIDTransfer();
USBHostHIDWrite This function starts a Set report transfer request to the device, utilizing
the function USBHostHIDTransfer();
Module
HID Client Driver
Description
1.4.2.3.1.1 USBHostHID_ApiFindBit Function
File
usb_host_hid.h
Syntax
bool USBHostHID_ApiFindBit(uint16_t usagePage, uint16_t usage, HIDReportTypeEnum type,
uint8_t* Report_ID, uint8_t* Report_Length, uint8_t* Start_Bit);
Description
This function is used to locate a specific button or indicator. Once the report descriptor is parsed by the HID layer without
any error, data from the report descriptor is stored in pre defined dat structures. This function traverses these data structure
and exract data required by application
Remarks
Application event handler with event 'EVENT_HID_RPT_DESC_PARSED' is called. Application is suppose to fill in data
details in structure 'HID_DATA_DETAILS'. This function can be used to the get the details of the required usages.
Preconditions
None
Parameters
Parameters Description
uint16_t usagePage usage page supported by application
uint16_t usage usage supported by application
HIDReportTypeEnum type report type Input/Output for the particular usage
uint8_t* Report_ID returns the report ID of the required usage
1.4 Library Interface MLA - USB Library Help Embedded Host API
166

- 1
- 2
…
- 164
- 165
- 166
- 167
- 168
…
- 311
- 312