7#ifndef _PICO_USB_RESET_TUSB_H
8#define _PICO_USB_RESET_TUSB_H
15#define TUD_RPI_RESET_DESC_LEN 9
16#define TUD_RPI_RESET_DESCRIPTOR(_itfnum, _stridx) \
18 TUD_RPI_RESET_DESC_LEN, TUSB_DESC_INTERFACE, _itfnum, 0, 0, TUSB_CLASS_VENDOR_SPECIFIC, RESET_INTERFACE_SUBCLASS, RESET_INTERFACE_PROTOCOL, _stridx
22#define RPI_RESET_MS_OS_20_DESC_LEN (0x08 + 0x14 + 0x80)
23#define RPI_RESET_MS_OS_20_DESCRIPTOR(itf_num) \
25 U16_TO_U8S_LE(0x0008), U16_TO_U8S_LE(MS_OS_20_SUBSET_HEADER_FUNCTION), itf_num, 0, U16_TO_U8S_LE(RPI_RESET_MS_OS_20_DESC_LEN), \
28 U16_TO_U8S_LE(0x0014), U16_TO_U8S_LE(MS_OS_20_FEATURE_COMPATBLE_ID), 'W', 'I', 'N', 'U', 'S', 'B', 0x00, 0x00, \
29 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
32 U16_TO_U8S_LE(0x0080), U16_TO_U8S_LE(MS_OS_20_FEATURE_REG_PROPERTY), \
33 U16_TO_U8S_LE(0x0001), U16_TO_U8S_LE(0x0028), \
34 'D', 0x00, 'e', 0x00, 'v', 0x00, 'i', 0x00, 'c', 0x00, 'e', 0x00, 'I', 0x00, 'n', 0x00, 't', 0x00, 'e', 0x00, \
35 'r', 0x00, 'f', 0x00, 'a', 0x00, 'c', 0x00, 'e', 0x00, 'G', 0x00, 'U', 0x00, 'I', 0x00, 'D', 0x00, 0x00, 0x00, \
36 U16_TO_U8S_LE(0x004E), \
38 '{', 0, 'b', 0, 'c', 0, '7', 0, '3', 0, '9', 0, \
39 '8', 0, 'c', 0, '1', 0, '-', 0, '7', 0, '3', 0, \
40 'c', 0, 'd', 0, '-', 0, '4', 0, 'c', 0, 'b', 0, \
41 '7', 0, '-', 0, '9', 0, '8', 0, 'b', 0, '8', 0, \
42 '-', 0, '9', 0, '1', 0, '3', 0, 'a', 0, '8', 0, \
43 'f', 0, 'c', 0, 'a', 0, '7', 0, 'b', 0, 'f', 0, \
47#include "device/usbd_pvt.h"
49void usb_reset_interface_init(
void);
50void usb_reset_interface_reset(uint8_t __unused rhport);
51uint16_t usb_reset_interface_open(uint8_t __unused rhport, tusb_desc_interface_t
const *itf_desc, uint16_t max_len);
52bool usb_reset_interface_control_xfer_cb(uint8_t __unused rhport, uint8_t stage, tusb_control_request_t
const * request);
53bool usb_reset_interface_xfer_cb(uint8_t __unused rhport, uint8_t __unused ep_addr, xfer_result_t __unused result, uint32_t __unused xferred_bytes);
55static usbd_class_driver_t
const usb_reset_interface_driver =
57#if CFG_TUSB_DEBUG >= 2
60 .init = usb_reset_interface_init,
61 .reset = usb_reset_interface_reset,
62 .open = usb_reset_interface_open,
63 .control_xfer_cb = usb_reset_interface_control_xfer_cb,
64 .xfer_cb = usb_reset_interface_xfer_cb,