8#define CMSIS_DAP_V2_DEVICE_INTERFACE_GUID \
9 '{', 0x00, 'C', 0x00, 'D', 0x00, 'B', 0x00, '3', 0x00, 'B', 0x00, \
10 '5', 0x00, 'A', 0x00, 'D', 0x00, '-', 0x00, '2', 0x00, '9', 0x00, \
11 '3', 0x00, 'B', 0x00, '-', 0x00, '4', 0x00, '6', 0x00, '6', 0x00, \
12 '3', 0x00, '-', 0x00, 'A', 0x00, 'A', 0x00, '3', 0x00, '6', 0x00, \
13 '-', 0x00, '1', 0x00, 'A', 0x00, 'A', 0x00, 'E', 0x00, '4', 0x00, \
14 '6', 0x00, '4', 0x00, '6', 0x00, '3', 0x00, '7', 0x00, '7', 0x00, \
15 '6', 0x00, '}', 0x00, 0x00, 0x00, 0x00, 0x00
17#define COMPATIBLE_ID_WINUSB \
18 'W', 'I', 'N', 'U', 'S', 'B', 0x00, 0x00
20#define WINUSB_VENDOR_CODE 0x20
23 struct msosv2_descriptor_set_header
header;
24#if defined(CONFIG_USB_COMPOSITE_DEVICE)
25 struct msosv2_function_subset_header subset_header;
35 .wLength =
sizeof(
struct msosv2_descriptor_set_header),
36 .wDescriptorType = MS_OS_20_SET_HEADER_DESCRIPTOR,
37 .dwWindowsVersion = 0x06030000,
40#if defined(CONFIG_USB_COMPOSITE_DEVICE)
42 .wLength =
sizeof(
struct msosv2_function_subset_header),
43 .wDescriptorType = MS_OS_20_SUBSET_HEADER_FUNCTION,
44 .wSubsetLength =
sizeof(
struct msosv2_function_subset_header)
45 + sizeof(struct msosv2_compatible_id)
46 + sizeof(struct msosv2_guids_property),
50 .wLength =
sizeof(
struct msosv2_compatible_id),
51 .wDescriptorType = MS_OS_20_FEATURE_COMPATIBLE_ID,
55 .wLength =
sizeof(
struct msosv2_guids_property),
56 .wDescriptorType = MS_OS_20_FEATURE_REG_PROPERTY,
57 .wPropertyDataType = MS_OS_20_PROPERTY_DATA_REG_MULTI_SZ,
58 .wPropertyNameLength = 42,
59 .PropertyName = {DEVICE_INTERFACE_GUIDS_PROPERTY_NAME},
60 .wPropertyDataLength = 80,
67 struct usb_bos_capability_msos
cap;
71 .bLength =
sizeof(
struct usb_bos_platform_descriptor)
72 + sizeof(struct usb_bos_capability_msos),
73 .bDescriptorType = USB_DESC_DEVICE_CAPABILITY,
74 .bDevCapabilityType = USB_BOS_CAPABILITY_PLATFORM,
76 .PlatformCapabilityUUID = {
81 0xDF, 0x60, 0xDD, 0xD8,
85 0x65, 0x9D, 0x9E, 0x64, 0x8A, 0x9F,
90 .dwWindowsVersion = sys_cpu_to_le32(0x06030000),
91 .wMSOSDescriptorSetTotalLength =
99 int32_t *len, uint8_t **data)
101 if (usb_reqtype_is_to_device(
setup)) {
106 setup->wIndex == MS_OS_20_DESCRIPTOR_INDEX) {
110 LOG_DBG(
"Get MS OS Descriptors v2");
struct msosv2_guids_property guids_property
Definition: usb_bulk_msosv2.h:28
struct msosv2_compatible_id compatible_id
Definition: usb_bulk_msosv2.h:27
struct msosv2_descriptor_set_header header
Definition: usb_bulk_msosv2.h:23
Definition: usb_bulk_msosv2.h:22
struct usb_bos_capability_msos cap
Definition: usb_bulk_msosv2.h:67
struct usb_bos_platform_descriptor platform
Definition: usb_bulk_msosv2.h:66
Definition: usb_bulk_msosv2.h:65
USB_DEVICE_BOS_DESC_DEFINE_CAP struct usb_bos_msosv2_desc bos_cap_msosv2
static struct msosv2_descriptor msosv2_cmsis_dap_desc
#define COMPATIBLE_ID_WINUSB
Definition: usb_bulk_msosv2.h:17
static int msosv2_vendor_handle_req(struct usb_setup_packet *setup, int32_t *len, uint8_t **data)
Definition: usb_bulk_msosv2.h:98
#define CMSIS_DAP_V2_DEVICE_INTERFACE_GUID
Definition: usb_bulk_msosv2.h:8
#define WINUSB_VENDOR_CODE
Definition: usb_bulk_msosv2.h:20