Vault 7: Projects

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

Description
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.
1.4.1.1.2.5 DESC_CONFIG_WORD Macro
File
usb_device.h
Syntax
#define DESC_CONFIG_WORD(a) (a&0xFF),((a>>8)&0xFF)
Description
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:
const uint8_t configDescriptor1[]={
0x09, // Size of this descriptor in bytes
USB_DESCRIPTOR_CONFIGURATION, // CONFIGURATION descriptor type
DESC_CONFIG_WORD(0x0022), // Total length of data for this cfg
1.4.1.1.2.6 USB_EP0_BUSY Macro
File
usb_device.h
Syntax
#define USB_EP0_BUSY 0x80 //The PIPE is busy
Description
The PIPE is busy
1.4.1.1.2.7 USB_EP0_INCLUDE_ZERO Macro
File
usb_device.h
Syntax
#define USB_EP0_INCLUDE_ZERO 0x40 //include a trailing zero packet
Description
include a trailing zero packet
1.4.1.1.2.8 USB_EP0_NO_DATA Macro
File
usb_device.h
Syntax
#define USB_EP0_NO_DATA 0x00 //no data to send
Description
no data to send
1.4 Library Interface MLA - USB Library Help Device/Peripheral
65

e-Highlighter

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

Un-highlight all Un-highlight selectionu Highlight selectionh