Forum: Mikrocontroller und Digitale Elektronik STM32 CubeMX // HID-Device-Class vs. Custom-HID-Device-Class


von M. L. (ado)


Lesenswert?

Ich verstehe irgendwie den Unterschied nicht zwischen
HID-Device-Class und Custom-HID-Device-Class.

Ich möchte mit Reports arbeiten und den Standard HID-Treiber verwenden.
Welche Classe sollte ich in CubeMX auswählen ?

Ich habe schon bei vielen Quellen nachgelesen, aber ein eindeutiges Bild 
hat sich für mich noch nicht ergeben und mein Kopf fängt langsam zu 
rauchen an.

von M. L. (ado)


Lesenswert?

Zusatzinformation:
Ich habe hier einen funktionierenden USB-Sensor, der auf STM32 portiert 
werden soll.
Hier ist der Device Descriptor:
1
user@X300 ~/usb $ lsusb -vd 0925:1299 
2
3
Bus 005 Device 004: ID 0925:1299 Lakeview Research 
4
Couldn't open device, some information will be missing
5
6
7
8
Device Descriptor:
9
  bLength                18
10
  bDescriptorType         1
11
  bcdUSB               2.00
12
  bDeviceClass            0 (Defined at Interface level)
13
  bDeviceSubClass         0 
14
  bDeviceProtocol         0 
15
  bMaxPacketSize0        32
16
  idVendor           0x0925 Lakeview Research
17
  idProduct          0x1299 
18
  bcdDevice            0.01
19
  iManufacturer           1 
20
  iProduct                2 
21
  iSerial                 0 
22
  bNumConfigurations      1
23
  
24
  
25
  
26
  Configuration Descriptor:
27
    bLength                 9
28
    bDescriptorType         2
29
    wTotalLength           41
30
    bNumInterfaces          1
31
    bConfigurationValue     1
32
    iConfiguration          0 
33
    bmAttributes         0xa0
34
      (Bus Powered)
35
      Remote Wakeup
36
    MaxPower              100mA
37
    
38
    
39
    
40
    Interface Descriptor:
41
      bLength                 9
42
      bDescriptorType         4
43
      bInterfaceNumber        0
44
      bAlternateSetting       0
45
      bNumEndpoints           2
46
      bInterfaceClass         3 Human Interface Device
47
      bInterfaceSubClass      0 No Subclass
48
      bInterfaceProtocol      0 None
49
      iInterface              0 
50
      
51
      
52
      
53
        HID Device Descriptor:
54
          bLength                 9
55
          bDescriptorType        33
56
          bcdHID               1.01
57
          bCountryCode            0 Not supported
58
          bNumDescriptors         1
59
          bDescriptorType        34 Report
60
          wDescriptorLength      47
61
         Report Descriptors: 
62
           ** UNAVAILABLE **
63
           
64
           
65
           
66
      Endpoint Descriptor:
67
        bLength                 7
68
        bDescriptorType         5
69
        bEndpointAddress     0x81  EP 1 IN
70
        bmAttributes            3
71
          Transfer Type            Interrupt
72
          Synch Type               None
73
          Usage Type               Data
74
        wMaxPacketSize     0x0020  1x 32 bytes
75
        bInterval               1
76
        
77
        
78
        
79
      Endpoint Descriptor:
80
        bLength                 7
81
        bDescriptorType         5
82
        bEndpointAddress     0x01  EP 1 OUT
83
        bmAttributes            3
84
          Transfer Type            Interrupt
85
          Synch Type               None
86
          Usage Type               Data
87
        wMaxPacketSize     0x0020  1x 32 bytes
88
        bInterval               1

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.