# 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
…
- 166
- 167
- 168
- 169
- 170
…
- 311
- 312

1.4.2.3.1.3 USBHostHID_ApiGetCurrentInterfaceNum Function
File
usb_host_hid.h
Syntax
uint8_t USBHostHID_ApiGetCurrentInterfaceNum();
Description
This function reurns the interface number of the cuurent report descriptor parsed. This function must be called to fill data
interface detail data structure and passed as parameter when requesinf for report transfers.
Remarks
None
Preconditions
None
Return Values
Return Values Description
TRUE Transfer is complete, errorCode is valid
FALSE Transfer is not complete, errorCode is not valid
Function
uint8_t USBHostHID_ApiGetCurrentInterfaceNum(void)
1.4.2.3.1.4 USBHostHID_ApiImportData Function
File
usb_host_hid.h
Syntax
bool USBHostHID_ApiImportData(uint8_t * report, uint16_t reportLength, HID_USER_DATA_SIZE *
buffer, HID_DATA_DETAILS * pDataDetails);
Description
This function can be used by application to extract data from the input reports. On receiving the input report from the device
application can call the function with required inputs 'HID_DATA_DETAILS'.
Remarks
None
Preconditions
None
Parameters
Parameters Description
uint8_t *report Input report received from device
uint16_t reportLength Length of input report report
HID_USER_DATA_SIZE *buffer Buffer into which data needs to be populated
HID_DATA_DETAILS *pDataDetails data details extracted from report descriptor
Return Values
Return Values Description
TRUE If the required data is retrieved from the report
FALSE If required data is not found.
1.4 Library Interface MLA - USB Library Help Embedded Host API
168

- 1
- 2
…
- 166
- 167
- 168
- 169
- 170
…
- 311
- 312