# 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
…
- 207
- 208
- 209
- 210
- 211
…
- 311
- 312

Remarks
None
Preconditions
None
Parameters
Parameters Description
uint8_t deviceAddress Device address
uint8_t deviceLUN Device LUN to access
uint8_t *commandBlock Pointer to the command block for the CBW
uint8_t commandBlockLength Length of the command block
uint8_t *data Pointer to the data buffer
uint32_t dataLength Byte size of the data buffer
Return Values
Return Values Description
USB_SUCCESS Request started successfully
USB_MSD_DEVICE_NOT_FOUND No device with specified address
USB_MSD_DEVICE_BUSY Device not in proper state for performing a transfer
USB_MSD_INVALID_LUN Specified LUN does not exist
Function
uint8_t USBHostMSDRead( uint8_t deviceAddress, uint8_t deviceLUN, uint8_t *commandBlock,
uint8_t commandBlockLength, uint8_t *data, uint32_t dataLength );
1.4.2.4.1.10 USBHostMSDWrite Macro
File
usb_host_msd.h
Syntax
#define USBHostMSDWrite(
deviceAddress,deviceLUN,commandBlock,commandBlockLength,data,dataLength ) \
USBHostMSDTransfer( deviceAddress, deviceLUN, 0, commandBlock, commandBlockLength,
data, dataLength )
Description
This function starts a mass storage write, utilizing the function USBHostMSDTransfer();
Remarks
None
Preconditions
None
Parameters
Parameters Description
uint8_t deviceAddress Device address
uint8_t deviceLUN Device LUN to access
uint8_t *commandBlock Pointer to the command block for the CBW
uint8_t commandBlockLength Length of the command block
uint8_t *data Pointer to the data buffer
uint32_t dataLength Byte size of the data buffer
1.4 Library Interface MLA - USB Library Help Embedded Host API
209

- 1
- 2
…
- 207
- 208
- 209
- 210
- 211
…
- 311
- 312