Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

Preconditions
The host state machine should be in the running state, and no reads or writes should be in progress.
Example
rc = USBHostSetDeviceConfiguration( attachedDevice, configuration );
if (rc)
{
// Error - cannot set configuration.
}
else
{
while (USBHostDeviceStatus( attachedDevice ) == USB_DEVICE_ENUMERATING)
{
USBHostTasks();
}
}
if (USBHostDeviceStatus( attachedDevice ) != USB_DEVICE_ATTACHED)
{
// Error - cannot set configuration.
}
Parameters
Parameters Description
uint8_t deviceAddress Device address
uint8_t configuration Index of the new configuration
Return Values
Return Values Description
USB_SUCCESS Process of changing the configuration was started
successfully.
USB_UNKNOWN_DEVICE Device not found
USB_INVALID_STATE This function cannot be called during enumeration or while
performing a device request.
USB_BUSY No IN or OUT transfers may be in progress.
Function
uint8_t USBHostSetDeviceConfiguration( uint8_t deviceAddress, uint8_t configuration )
1.4.2.1.1.16 USBHostSetNAKTimeout Function
This function specifies NAK timeout capability.
File
usb_host.h
Syntax
uint8_t USBHostSetNAKTimeout(uint8_t deviceAddress, uint8_t endpoint, uint16_t flags,
uint16_t timeoutCount);
Description
This function is used to set whether or not an endpoint on a device should time out a transaction based on the number of
NAKs received, and if so, how many NAKs are allowed before the timeout.
Remarks
None
Preconditions
None
1.4 Library Interface MLA - USB Library Help Embedded Host API
111

e-Highlighter

Click to send permalink to address bar, or right-click to copy permalink.

Un-highlight all Un-highlight selectionu Highlight selectionh