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

uint8_t* Report_Length returns the report length of the required usage
uint8_t* Start_Bit returns the start bit of the usage in a particular report
Return Values
Return Values Description
TRUE If the required usage is located in the report descriptor
FALSE If the application required usage is not supported by the
device(i.e report descriptor).
Function
bool USBHostHID_ApiFindBit(uint16_t usagePage,uint16_t usage, HIDReportTypeEnum type,
uint8_t* Report_ID, uint8_t* Report_Length, uint8_t* Start_Bit)
1.4.2.3.1.2 USBHostHID_ApiFindValue Function
File
usb_host_hid.h
Syntax
bool USBHostHID_ApiFindValue(uint16_t usagePage, uint16_t usage, HIDReportTypeEnum type,
uint8_t* Report_ID, uint8_t* Report_Length, uint8_t* Start_Bit, uint8_t* Bit_Length);
Description
Find a specific Usage Value. 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 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
uint8_t* Report_Length returns the report length of the required usage
uint8_t* Start_Bit returns the start bit of the usage in a particular report
uint8_t* Bit_Length returns size of requested usage type data in bits
Return Values
Return Values Description
TRUE If the required usage is located in the report descriptor
FALSE If the application required usage is not supported by the
device(i.e report descriptor).
Function
bool USBHostHID_ApiFindValue(uint16_t usagePage,uint16_t usage,
HIDReportTypeEnum type,uint8_t* Report_ID,uint8_t* Report_Length,uint8_t*
Start_Bit, uint8_t* Bit_Length)
1.4 Library Interface MLA - USB Library Help Embedded Host API
167

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