# 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
…
- 52
- 53
- 54
- 55
- 56
…
- 311
- 312

For more information about remote wakeup, see the following section of the USB v2.0 specification available at www.usb.org:
• Section 9.2.5.2
• Table 9-10
• Section 7.1.7.7
• Section 9.4.5
Remarks
None
Preconditions
None
Return Values
Return Values Description
true Remote Wakeup has been enabled by the host
false Remote Wakeup is not currently enabled
Function
bool USBGetRemoteWakeupStatus(void)
1.4.1.1.1.20 USBGetSuspendState Function
This function indicates if the USB port that this device is attached to is currently suspended. When suspended, it will not be
able to transfer data over the bus.
File
usb_device.h
Syntax
bool USBGetSuspendState();
Description
This function indicates if the USB port that this device is attached to is currently suspended. When suspended, it will not be
able to transfer data over the bus. This function can be used by the application to skip over section of code that do not need
to exectute if the device is unable to send data over the bus. This function can also be used to help determine when it is
legal to perform USB remote wakeup signalling, for devices supporting this feature.
Typical usage:
void main(void)
{
USBDeviceInit()
while(1)
{
USBDeviceTasks();
if((USBGetDeviceState() < CONFIGURED_STATE) ||
(USBGetSuspendState() == true))
{
//Either the device is not configured or we are suspended
// so we don't want to do execute any application code
continue; //go back to the top of the while loop
}
else
{
//Otherwise we are free to run user application code.
UserApplication();
}
}
}
1.4 Library Interface MLA - USB Library Help Device/Peripheral
54

- 1
- 2
…
- 52
- 53
- 54
- 55
- 56
…
- 311
- 312