Data Structures | Functions

Microsoft-Specific Descriptors
[Public API]

Packet structs from Microsoft's documentation which deal with the Microsoft OS String Descriptor and the Extended Compat Descriptors. More...

Data Structures

struct  microsoft_os_descriptor
 OS String Descriptor. More...
struct  microsoft_extended_compat_header
 Extended Compat ID Header. More...
struct  microsoft_extended_compat_function
 Extended Compat ID Function. More...
struct  microsoft_extended_properties_header
 Extended Properties Header. More...
struct  microsoft_extended_property_section_header
 Extended Property Section header. More...

Functions

uint16_t MICROSOFT_COMPAT_ID_DESCRIPTOR_FUNC (uint8_t interface, const void **descriptor)
 Callback for the GET_MS_DESCRIPTOR/CompatID request.
uint16_t MICROSOFT_CUSTOM_PROPERTY_DESCRIPTOR_FUNC (uint8_t interface, const void **descriptor)
 Callback for the GET_MS_DESCRIPTOR/Custom_Property request.

Detailed Description

Packet structs from Microsoft's documentation which deal with the Microsoft OS String Descriptor and the Extended Compat Descriptors.

For more information about these structures, see the Microsoft documentation at http://msdn.microsoft.com/library/windows/hardware/gg463182 or search for "Microsoft OS Descriptors" on http://msdn.microsoft.com . Also see docs/winusb.txt in the M-Stack distribution.


Function Documentation

uint16_t MICROSOFT_COMPAT_ID_DESCRIPTOR_FUNC ( uint8_t  interface,
const void **  descriptor 
)

Callback for the GET_MS_DESCRIPTOR/CompatID request.

MICROSOFT_COMPAT_ID_DESCRIPTOR_FUNC() is called when a GET_MS_DESCRIPTOR request is received from the host with a wIndex of 0x0004. The value of MS_GET_DESCRIPTOR request is defined by MICROSOFT_OS_DESC_VENDOR_CODE which is set in usb_config.h, and reported to the host as part of the microsoft_os_descriptor. See the MSDN documentation on "Microsoft OS Descriptors" for more information.

Parameters:
interfaceThe interface for which the descriptor is queried
descriptora pointer to a pointer which should be set to the descriptor data.
Returns:
Return the length of the descriptor pointed to by *descriptor, or -1 if the descriptor does not exist.
uint16_t MICROSOFT_CUSTOM_PROPERTY_DESCRIPTOR_FUNC ( uint8_t  interface,
const void **  descriptor 
)

Callback for the GET_MS_DESCRIPTOR/Custom_Property request.

MICROSOFT_CUSTOM_PROPERTY_DESCRIPTOR_FUNC() is called when a GET_MS_DESCRIPTOR request with a wIndex of 0x0005 is received from the host. The value of the MS_GET_DESCRIPTOR request is defined by MICROSOFT_OS_DESC_VENDOR_CODE which is set in usb_config.h, and reported to the host as part of the microsoft_os_descriptor. See the MSDN documentation on "Microsoft OS Descriptors" for more information.

Parameters:
interfaceThe interface for which the descriptor is queried
descriptora pointer to a pointer which should be set to the descriptor data.
Returns:
Return the length of the descriptor pointed to by *descriptor, or -1 if the descriptor does not exist.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator