.... 다른 사람을 더 이상 많이 변경하지 않는 많은 것들을 스캔 시간을 보내지 않는 확인 그 작품! 여기 *이 IAD (HID 펜 장치 + CDC) /********************** USB 구성 디스크립터 내 USB의 구성 서술자 *********************/
0x09, /* bLength: Configuration Descriptor size */
USB_CONFIGURATION_DESCRIPTOR_TYPE, /* bDescriptorType: Configuration */
USB_CONFIG_DESC_SIZE, /* wTotalLength: Bytes returned */
0x00,
0x03, /*bNumInterfaces: 3 interface*/
0x01, /*bConfigurationValue: Configuration value*/
0x01, /*iConfiguration: Index of string descriptor describing the configuration*/
0x80, /*bmAttributes: self powered */
0xFA, /*MaxPower 500 mA: this current is used for detecting Vbus*/
/* Total 09 */
/******************** ** HID 디지타이저 인터페이스 **********************/
0x09, /*bLength: Interface Descriptor size*/
USB_INTERFACE_DESCRIPTOR_TYPE, /*bDescriptorType: Interface descriptor type*/
0x00, /*bInterfaceNumber: Number of Interface*/
0x00, /*bAlternateSetting: Alternate setting*/
0x01, /*bNumEndpoints*/
0x03, /*bInterfaceClass: HID*/
0x00, /*bInterfaceSubClass : 1=BOOT, 0=no boot*/
0x00, /*nInterfaceProtocol : 0=none, 1=keyboard, 2=mouse*/
0x00, /*iInterface: Index of string descriptor*/
/* Total 18 */
/******************** Descriptor of Digitizer HID ********************/
0x09, /*bLength: HID Descriptor size*/
HID_DESCRIPTOR_TYPE, /*bDescriptorType: HID*/
0x11, /*bcdHID: HID Class Spec release number*/
0x01,
0x00, /*bCountryCode: Hardware target country*/
0x01, /*bNumDescriptors: Number of HID class descriptors to follow*/
0x22, /*bDescriptorType*/
HID_DIGITIZER_REPORT_DESC_SIZE, /*wItemLength: Total length of Report descriptor*/
0x00,
/* Total 27 */
/******************** Descriptor of Digitizer endpoint ********************/
0x07, /*bLength: Endpoint Descriptor size*/
USB_ENDPOINT_DESCRIPTOR_TYPE, /*bDescriptorType:*/
HID_IN_EP, /*bEndpointAddress: Endpoint Address (IN)*/
0x03, /*bmAttributes: Interrupt endpoint*/
HID_IN_PACKET_DIG, /*wMaxPacketSize: 4 Byte max */
0x00,
0x03, /*bInterval: Polling Interval (3 ms)*/
/* Total 34 */
/************** *** 인터페이스 연관 기술자 *********************/
, 0x08, // Size of this descriptor in bytes
0x0B, // Interface association descriptor type
0x01, // First associated interface
0x02, // Number of contiguous associated interfaces
COMM_INTF, // bInterfaceClass of the first interface
ABSTRACT_CONTROL_MODEL, // bInterfaceSubClass of the first interface
V25TER, // bInterfaceProtocol of the first interface
0x00, // Interface string index
/* Total 42 */
/***************** CDC에 대한 설명자 **********************/
// Interface Descriptor
0x09, // Size of this descriptor in bytes
USB_DESCRIPTOR_INTERFACE, // Interface descriptor type
CDC_COMM_INTF_ID, // Interface number
0x00, // Alternate setting number
0x01, // Number of endpoints in this interface
COMM_INTF, // Class code
ABSTRACT_CONTROL_MODEL, // Subclass code
V25TER, // Protocol code
0x00, // Interface string index
/* Total 51 */
// CDC Class Specific
0x05, // Size of this descriptor in bytes (5)
CS_INTERFACE, // bDescriptorType
DSC_FN_HEADER, // bDescriptorSubtype
0x20, 0x01, // bcdCDC
/* Total 56 */
// Abstract Control Management Functional Descriptor
0x04, // Size of this descriptor in bytes (4)
CS_INTERFACE, // bDescriptorType
DSC_FN_ACM, // bDescriptorSubtype
USB_CDC_ACM_FN_DSC_VAL, // bmCapabilities: (see PSTN120.pdf Table 4)
/* Total 60 */
// Union Functional Descriptor
0x05, // Size of this descriptor in bytes (5)
CS_INTERFACE, // bDescriptorType
DSC_FN_UNION, // bDescriptorSubtype
0x01, // bControlInterface
0x02, // bSubordinateInterface0
/* Total 65 */
// Call Management Functional Descriptor
0x05, // Size of this descriptor in bytes (5)
CS_INTERFACE, // bDescriptorType
DSC_FN_CALL_MGT, // bDescriptorSubtype
0x00, // bmCapabilities
0x02, // bDataInterface
/* Total 70 */
// Endpoint Descriptor
0x07, // Size of this descriptor in bytes (7)
USB_DESCRIPTOR_ENDPOINT, // Endpoint descriptor
CDC_CMD_EP, // Endpoint address
_INTERRUPT, // Attributes
CDC_COMM_IN_EP_SIZE, 0x00, // Size
0x02, // Interval
/* Total 77 */
// CDC Data Interface
0x09, // Size of this descriptor in bytes (9)
USB_DESCRIPTOR_INTERFACE, // Interface descriptor type
0x02, // Interface number
0x00, // Alternate setting number
0x02, // Number of endpoints in this interface
DATA_INTF, // Class code
0x00, // Subclass code
NO_PROTOCOL, // Protocol code
0x00, // Interface string index
/* Total 86 */
// Endpoint Descriptor
0x07, // Size of this descriptor in bytes
USB_DESCRIPTOR_ENDPOINT, // Endpoint descriptor
CDC_OUT_EP, // Endpoint address
_BULK, // Attributes
DESC_CONFIG_WORD(0x40), // Size
0x00, // Interval
/* Total 93 */
// Endpoint Descriptor
0x07, // Size of this descriptor in bytes
USB_DESCRIPTOR_ENDPOINT, // Endpoint descriptor
CDC_IN_EP, // Endpoint address
_BULK, // Attributes
DESC_CONFIG_WORD(0x40), // Size
0x00
/* Total 100 */
그리고 마지막으로 내가 사용하는 HID 설명 :
0x05, 0x0d, // USAGE_PAGE (Digitizers)
0x09, 0x01, // USAGE (Digitizers)
// +4
0xa1, 0x01, // COLLECTION (Application)
0x09, 0x02, // USAGE (pen)
// +4
0xa1, 0x00, // COLLECTION (Physical)
// +2
0x09, 0x42, // USAGE (Tip Switch)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0x01, // LOGICAL_MAXIMUM (1)
0x75, 0x01, // REPORT_SIZE (1)
0x95, 0x01, // REPORT_COUNT (1)
0x81, 0x02, // INPUT (Data,Var,Abs)
// +12
0x09, 0x00, // USAGE (Undefined/Padding)
0x75, 0x03, // REPORT_SIZE (3)
0x95, 0x01, // REPORT_COUNT (1)
0x81, 0x03, // INPUT (Cnst,Var,Abs)
// +8
0x09, 0x32, // USAGE (In Range)
0x75, 0x01, // REPORT_SIZE (1)
0x95, 0x01, // REPORT_COUNT (1)
0x81, 0x02, // INPUT (Data,Var,Abs)
// +8
0x09, 0x00, // USAGE (Undefined/Padding)
0x75, 0x03, // REPORT_SIZE (3)
0x95, 0x01, // REPORT_COUNT (1)
0x81, 0x03, // INPUT (Cnst,Var,Abs)
// +8
// X TILT
0x09, 0x3d, // USAGE (X tilt)
0x16, 0xd8, 0xdc, // LOGICAL_MINIMUM (-9000)
0x26, 0x28, 0x23, // LOGICAL_MAXIMUM (9000)
0x75, 0x10, // REPORT_SIZE (16)
0x95, 0x01, // REPORT_COUNT (1)
0x55, 0x0E, // UNIT_EXPONENT (-2)
0x65, 0x14, // UNIT (en dg)
0x36, 0xd8, 0xdc, // PHYSICAL_MINIMUM (-9000)
0x46, 0x28, 0x23, // PHYSICAL_MAXIMUM (9000)
0x81, 0x02, // INPUT (Data,Var,Abs)
// +24
// Y TILT
0x09, 0x3e, // USAGE (Y tilt)
0x16, 0xd8, 0xdc, // LOGICAL_MINIMUM (-9000)
0x26, 0x28, 0x23, // LOGICAL_MAXIMUM (9000)
0x75, 0x10, // REPORT_SIZE (16)
0x95, 0x01, // REPORT_COUNT (1)
0x55, 0x0E, // UNIT_EXPONENT (-2)
0x65, 0x14, // UNIT (en dg)
0x36, 0xd8, 0xdc, // PHYSICAL_MINIMUM (-9000)
0x46, 0x28, 0x23, // PHYSICAL_MAXIMUM (9000)
0x81, 0x02, // INPUT (Data,Var,Abs)
// +24
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x26, 0x08, 0x52, // LOGICAL_MAXIMUM (21000) /// 0x08, 0x52, = 21000
0x75, 0x10, // REPORT_SIZE (16)
0x95, 0x01, // REPORT_COUNT (1)
0x55, 0x0d, // UNIT_EXPONENT (-3)
0x65, 0x11, // UNIT (en cm)
0x09, 0x30, // USAGE (X)
0x35, 0x00, // PHYSICAL_MINIMUM (0)
0x46, 0x08, 0x52, // PHYSICAL_MAXIMUM (21000)
0x81, 0x02, // INPUT (Data,Var,Abs)
// +24
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x26, 0xd0, 0x39, // LOGICAL_MAXIMUM (14800) /// 0xd0, 0x39, = 14800
0x75, 0x10, // REPORT_SIZE (16)
0x95, 0x01, // REPORT_COUNT (1)
0x55, 0x0d, // UNIT_EXPONENT (-3)
0x65, 0x11, // UNIT (en cm)
0x09, 0x31, // USAGE (Y)
0x35, 0x00, // PHYSICAL_MINIMUM (0)
0x46, 0xd0, 0x39, // PHYSICAL_MAXIMUM (14800)
0x81, 0x02, // INPUT (Data,Var,Abs)
// +22
0xc0, // END_COLLECTION
0xc0, // END_COLLECTION
// +2
// TOTAL = 142
내 문제는 내가 (활성) D0 이외의 전원 상태를 처리 할 수없는 경우가있는 것으로 생각합니다. HID Windows 드라이버에서 요구하는 전원 수준 'PowerDeviceD3'을 거부 할 수있는 방법을 검색하지만 실제로 수행 할 수 있는지 여부는 알 수 없습니다. – user2629409