# 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
…
- 176
- 177
- 178
- 179
- 180
…
- 311
- 312

Return Values
Return Values Description
USB_SUCCESS Request started successfully
USB_HID_DEVICE_NOT_FOUND No device with specified address
USB_HID_DEVICE_BUSY Device not in proper state for performing a transfer
Others Return values from USBHostRead()
Function
uint8_t USBHostHIDRead( uint8_t deviceAddress,uint8_t reportid, uint8_t interface,
uint8_t size, uint8_t *data)
1.4.2.3.1.24 USBHostHIDWrite Macro
This function starts a Set report transfer request to the device, utilizing the function USBHostHIDTransfer();
File
usb_host_hid.h
Syntax
#define USBHostHIDWrite( address,reportid,interface,size,data) \
USBHostHIDTransfer( address,0,interface,reportid,size,data)
Remarks
None
Preconditions
None
Parameters
Parameters Description
uint8_t deviceAddress Device address
uint8_t reportid Report ID of the requested report
uint8_t interface Interface number
uint8_t size Byte size of the data buffer
uint8_t *data Pointer to the data buffer
Return Values
Return Values Description
USB_SUCCESS Request started successfully
USB_HID_DEVICE_NOT_FOUND No device with specified address
USB_HID_DEVICE_BUSY Device not in proper state for performing a transfer
Others Return values from USBHostIssueDeviceRequest(), and
USBHostWrite()
Function
uint8_t USBHostHIDWrite( uint8_t deviceAddress,uint8_t reportid, uint8_t interface,
uint8_t size, uint8_t *data)
1.4.2.3.2 Data Types and Constants
Enumerations
Name Description
HIDReportTypeEnum This is type HIDReportTypeEnum.
1.4 Library Interface MLA - USB Library Help Embedded Host API
178

- 1
- 2
…
- 176
- 177
- 178
- 179
- 180
…
- 311
- 312