Partager via


Exemples de descripteur de rapport (touchscreen-sample-report-descriptors)

Cette rubrique présente un exemple de descripteur de rapport et un exemple d’extrait de descripteur pour un appareil Écran tactile Windows.

Remarque Si vous implémentez le descripteur suivant sur une référence SKU spécifique à un appareil mobile ou à un téléphone Windows, consultez l’article de base de connaissances sur le problème de descripteur IHM (accès partenaire requis), pour vous assurer que la configuration de votre appareil mobile est la bonne.

Notes

Bien que les utilisations spécifiques du fournisseur puissent être utilisées à n’importe quel niveau du rapport, elles doivent être utilisées d’une manière qui peut être implémentée de la même façon dans toutes les méthodes de création de rapports, à savoir, en série, parallèle et hybride. Le non-respect de ces instructions peut ne pas entraîner de défaillance HLK, mais peut entraîner de graves problèmes de compatibilité.

Exemple de descripteur de rapport

Voici un exemple de descripteur d’un appareil en mode parallèle/hybride à deux doigts.

    0x05, 0x0d,                         // USAGE_PAGE (Digitizers)          
    0x09, 0x04,                         // USAGE (Touch Screen)             
    0xa1, 0x01,                         // COLLECTION (Application)         
    0x85, 0x01,                         //   REPORT_ID (Touch)              
    0x09, 0x22,                         //   USAGE (Finger)                 
    0xa1, 0x02,                         //     COLLECTION (Logical)  
    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) 
    0x95, 0x07,                         //       REPORT_COUNT (7)  
    0x81, 0x03,                         //       INPUT (Cnst,Ary,Abs)
    0x75, 0x08,                         //       REPORT_SIZE (8)
    0x09, 0x51,                         //       USAGE (Contact Identifier)
    0x95, 0x01,                         //       REPORT_COUNT (1)             
    0x81, 0x02,                         //       INPUT (Data,Var,Abs) 
    0x05, 0x01,                         //       USAGE_PAGE (Generic Desk..
    0x26, 0xff, 0x0f,                   //       LOGICAL_MAXIMUM (4095)         
    0x75, 0x10,                         //       REPORT_SIZE (16)             
    0x55, 0x0e,                         //       UNIT_EXPONENT (-2)           
    0x65, 0x13,                         //       UNIT(Inch,EngLinear)                  
    0x09, 0x30,                         //       USAGE (X)                    
    0x35, 0x00,                         //       PHYSICAL_MINIMUM (0)         
    0x46, 0xb5, 0x04,                   //       PHYSICAL_MAXIMUM (1205)
    0x95, 0x02,                         //       REPORT_COUNT (2)         
    0x81, 0x02,                         //       INPUT (Data,Var,Abs)         
    0x46, 0x8a, 0x03,                   //       PHYSICAL_MAXIMUM (906)
    0x09, 0x31,                         //       USAGE (Y)                    
    0x81, 0x02,                         //       INPUT (Data,Var,Abs)
    0x05, 0x0d,                         //       USAGE_PAGE (Digitizers)
    0x09, 0x48,                         //       USAGE (Width)                
    0x09, 0x49,                         //       USAGE (Height)               
    0x81, 0x02,                         //       INPUT (Data,Var,Abs)
    0x95, 0x01,                         //       REPORT_COUNT (1)
    0x55, 0x0C,                         //       UNIT_EXPONENT (-4)           
    0x65, 0x12,                         //       UNIT (Radians,SIROtation)        
    0x35, 0x00,                         //       PHYSICAL_MINIMUM (0)         
    0x47, 0x6f, 0xf5, 0x00, 0x00,       //       PHYSICAL_MAXIMUM (62831)      
    0x15, 0x00,                         //       LOGICAL_MINIMUM (0)      
    0x27, 0x6f, 0xf5, 0x00, 0x00,       //       LOGICAL_MAXIMUM (62831)        
    0x09, 0x3f,                         //       USAGE (Azimuth[Orientation]) 
    0x81, 0x02,                         //       INPUT (Data,Var,Abs)  
    0xc0,                               //     END_COLLECTION
    0x09, 0x22,                         //   USAGE (Finger)                 
    0xa1, 0x02,                         //     COLLECTION (Logical)  
    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) 
    0x95, 0x07,                         //       REPORT_COUNT (7)  
    0x81, 0x03,                         //       INPUT (Cnst,Ary,Abs)
    0x75, 0x08,                         //       REPORT_SIZE (8)
    0x09, 0x51,                         //       USAGE (Contact Identifier)
    0x95, 0x01,                         //       REPORT_COUNT (1)             
    0x81, 0x02,                         //       INPUT (Data,Var,Abs) 
    0x05, 0x01,                         //       USAGE_PAGE (Generic Desk..
    0x26, 0xff, 0x0f,                   //       LOGICAL_MAXIMUM (4095)         
    0x75, 0x10,                         //       REPORT_SIZE (16)             
    0x55, 0x0e,                         //       UNIT_EXPONENT (-2)           
    0x65, 0x13,                         //       UNIT(Inch,EngLinear)                  
    0x09, 0x30,                         //       USAGE (X)                    
    0x35, 0x00,                         //       PHYSICAL_MINIMUM (0)         
    0x46, 0xb5, 0x04,                   //       PHYSICAL_MAXIMUM (1205)
    0x95, 0x02,                         //       REPORT_COUNT (2)         
    0x81, 0x02,                         //       INPUT (Data,Var,Abs)         
    0x46, 0x8a, 0x03,                   //       PHYSICAL_MAXIMUM (906)
    0x09, 0x31,                         //       USAGE (Y)                    
    0x81, 0x02,                         //       INPUT (Data,Var,Abs)
    0x05, 0x0d,                         //       USAGE_PAGE (Digitizers)
    0x09, 0x48,                         //       USAGE (Width)                
    0x09, 0x49,                         //       USAGE (Height)               
    0x81, 0x02,                         //       INPUT (Data,Var,Abs)
    0x95, 0x01,                         //       REPORT_COUNT (1)
    0x55, 0x0C,                         //       UNIT_EXPONENT (-4)           
    0x65, 0x12,                         //       UNIT (Radians,SIROtation)        
    0x35, 0x00,                         //       PHYSICAL_MINIMUM (0)         
    0x47, 0x6f, 0xf5, 0x00, 0x00,       //       PHYSICAL_MAXIMUM (62831)      
    0x15, 0x00,                         //       LOGICAL_MINIMUM (0)      
    0x27, 0x6f, 0xf5, 0x00, 0x00,       //       LOGICAL_MAXIMUM (62831)        
    0x09, 0x3f,                         //       USAGE (Azimuth[Orientation]) 
    0x81, 0x02,                         //       INPUT (Data,Var,Abs)  
    0xc0,                               //     END_COLLECTION
    0x05, 0x0d,                         //   USAGE_PAGE (Digitizers)
    0x55, 0x0C,                         //     UNIT_EXPONENT (-4)           
    0x66, 0x01, 0x10,                   //     UNIT (Seconds)        
    0x47, 0xff, 0xff, 0x00, 0x00,       //       PHYSICAL_MAXIMUM (65535)
    0x27, 0xff, 0xff, 0x00, 0x00,       //   LOGICAL_MAXIMUM (65535) 
    0x75, 0x10,                         //   REPORT_SIZE (16)             
    0x95, 0x01,                         //   REPORT_COUNT (1) 
    0x09, 0x56,                         //   USAGE (Scan Time)
    0x81, 0x02,                         //   INPUT (Data,Var,Abs)         
    0x09, 0x54,                         //   USAGE (Contact count)
    0x25, 0x7f,                         //   LOGICAL_MAXIMUM (127) 
    0x95, 0x01,                         //   REPORT_COUNT (1)
    0x75, 0x08,                         //   REPORT_SIZE (8)    
    0x81, 0x02,                         //   INPUT (Data,Var,Abs)
    0x85, REPORTID_MAX_COUNT,           //   REPORT_ID (Feature)              
    0x09, 0x55,                         //   USAGE(Contact Count Maximum)
    0x95, 0x01,                         //   REPORT_COUNT (1)
    0x25, 0x02,                         //   LOGICAL_MAXIMUM (2)
    0xb1, 0x02,                         //   FEATURE (Data,Var,Abs)
    0x85, 0x44,                         //   REPORT_ID (Feature)
    0x06, 0x00, 0xff,                   //   USAGE_PAGE (Vendor Defined)  
    0x09, 0xC5,                         //   USAGE (Vendor Usage 0xC5)    
    0x15, 0x00,                         //   LOGICAL_MINIMUM (0)          
    0x26, 0xff, 0x00,                   //   LOGICAL_MAXIMUM (0xff) 
    0x75, 0x08,                         //   REPORT_SIZE (8)             
    0x96, 0x00,  0x01,                  //   REPORT_COUNT (0x100 (256))             
    0xb1, 0x02,                         //   FEATURE (Data,Var,Abs) 
    0xc0,                               // END_COLLECTION 

Notez que Windows s’attend à ce que la coordonnée (0,0) soit le coin supérieur gauche de l’orientation de l’affichage natif, portrait ou paysage.

Exemple de descripteur de rapport - (Rapport des fonctionnalités en mode latence)

L’extrait suivant provient du descripteur de la collection de niveau supérieur Écran tactile Windows pour la prise en charge facultative (fortement recommandée) du rapport des fonctionnalités en mode de latence.

    0x05, 0x0d,                         //    USAGE_PAGE (Digitizer)
    0x85, REPORTID_LATENCY,             //    REPORT_ID (Latency)              
    0x09, 0x60,                         //    USAGE(Latency Mode)
    0x75, 0x01,                         //    REPORT_SIZE (1) 
    0x95, 0x01,                         //    REPORT_COUNT (1)
    0x15, 0x00,                         //    LOGICAL_MINIMUM (0)
    0x25, 0x01,                         //    LOGICAL_MAXIMUM (1)
    0xb1, 0x02,                         //    FEATURE (Data,Var,Abs)
    0x95, 0x07,                         //    REPORT_COUNT (7)             
    0xb1, 0x03,                         //    FEATURE (Cnst,Var,Abs)