Vault 7: Projects

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

USBOUTDataStageDeferred Returns true if a control transfer with OUT data stage is pending,
and the firmware has called USBDeferOUTDataStage(), but has not
yet called USBCtrlEPAllowDataStage(). Returns false if a control
transfer with OUT data stage is either not pending, or the firmware
did not call USBDeferOUTDataStage() at the start of the control
transfer.
This function (macro) would typically be used in the case where the
USBDeviceTasks() function executes in the interrupt context (ex:
USB_INTERRUPT option selected in usb_config.h), but the
firmware wishes to take care of handling the data stage of the
control transfer in the main... more
USBRxOnePacket Receives the specified data out the specified endpoint
USBSoftDetach This function performs a detach from the USB bus via software.
USBStallEndpoint Configures the specified endpoint to send STALL to the host, the
next time the host tries to access the endpoint.
USBTransferOnePacket Transfers a single packet (one transaction) of data on the USB bus.
USBTxOnePacket Sends the specified data out the specified endpoint
Macros
Name Description
DESC_CONFIG_uint32_t The DESC_CONFIG_uint32_t() macro is implemented for convinence.
Since the configuration descriptor array is a uint8_t array, each entry
needs to be a uint8_t in LSB format. The DESC_CONFIG_uint32_t()
macro breaks up a uint32_t into the appropriate uint8_t entries in LSB.
DESC_CONFIG_uint8_t The DESC_CONFIG_uint8_t() macro is implemented for convinence. The
DESC_CONFIG_uint8_t() macro provides a consistant macro for use
with a byte when generating a configuratin descriptor when using either
the DESC_CONFIG_WORD() or DESC_CONFIG_uint32_t() macros.
DESC_CONFIG_WORD The DESC_CONFIG_WORD() macro is implemented for convinence.
Since the configuration descriptor array is a uint8_t array, each entry
needs to be a uint8_t in LSB format. The DESC_CONFIG_WORD()
macro breaks up a uint16_t into the appropriate uint8_t entries in LSB.
Typical Usage:
USB_EP0_BUSY The PIPE is busy
USB_EP0_INCLUDE_ZERO include a trailing zero packet
USB_EP0_NO_DATA no data to send
USB_EP0_NO_OPTIONS no options set
USB_EP0_RAM Data comes from const
USB_EP0_ROM Data comes from RAM
USB_HANDLE USB_HANDLE is a pointer to an entry in the BDT. This pointer can be
used to read the length of the last transfer, the status of the last transfer,
and various other information. Insure to initialize USB_HANDLE objects
to NULL so that they are in a known state during their first usage.
Module
Device Stack
Types
Name Description
USB_DEVICE_STACK_EVENTS USB device stack events description here - DWF
USB_DEVICE_STATE USB Device States as returned by USBGetDeviceState(). Only the
defintions for these states should be used. The actual value for each
state should not be relied upon as constant and may change based on
the implementation.
Description
This is file usb_device.h.
1.4 Library Interface MLA - USB Library Help Device/Peripheral
69

e-Highlighter

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

Un-highlight all Un-highlight selectionu Highlight selectionh