最終更新:2012-06-10 (日) 03:51:24 (2479d)  

Elotouch Driver はてなブックマークを見る
Top / Elotouch Driver

The Elotouch driver is a KMDF driver that can work as both a multitouch driver and a mouse driver. Its architecture is very similar to the WacomKMDF Driver.

http://msdn.microsoft.com/en-us/library/ff553717.aspx

メモ

  • HIDに対応してない場合のサンプル。(シリアル接続?なのをドライバHIDに変換)。

レポートディスクリプタ

UCHAR gReportDescriptor[] = {
   
    0x05, 0x0d,	                        // USAGE_PAGE (Digitizers)          
    0x09, 0x04,	                        // USAGE (Touch Screen)             
    0xa1, 0x01,                         // COLLECTION (Application)         
    0x85, REPORTID_MTOUCH,              //   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) 
    0x09, 0x32,	                        //       USAGE (In Range)             
    0x81, 0x02,                         //       INPUT (Data,Var,Abs)         
    0x95, 0x06,                         //       REPORT_COUNT (6)  
    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, 0x33,                         //       UNIT (Inch,EngLinear)                  
    0x09, 0x30,                         //       USAGE (X)                    
    0x35, 0x00,                         //       PHYSICAL_MINIMUM (0)         
    0x46, 0xb5, 0x04,                   //       PHYSICAL_MAXIMUM (1205)         
    0x81, 0x02,                         //       INPUT (Data,Var,Abs)         
    0x46, 0x8a, 0x03,                   //       PHYSICAL_MAXIMUM (906)
    0x09, 0x31,                         //       USAGE (Y)                    
    0x81, 0x02,                         //       INPUT (Data,Var,Abs)
    0xc0,                               //    END_COLLECTION
    0xa1, 0x02,                         //    COLLECTION (Logical)  
    0x05, 0x0d,	                        //       USAGE_PAGE (Digitizers)  
    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) 
    0x09, 0x32,	                        //       USAGE (In Range)             
    0x81, 0x02,                         //       INPUT (Data,Var,Abs)         
    0x95, 0x06,                         //       REPORT_COUNT (6)  
    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, 0x33,                         //       UNIT (Inch,EngLinear)                  
    0x09, 0x30,                         //       USAGE (X)                    
    0x35, 0x00,                         //       PHYSICAL_MINIMUM (0)         
    0x46, 0xb5, 0x04,                   //       PHYSICAL_MAXIMUM (1205)         
    0x81, 0x02,                         //       INPUT (Data,Var,Abs)         
    0x46, 0x8a, 0x03,                   //       PHYSICAL_MAXIMUM (906)
    0x09, 0x31,                         //       USAGE (Y)                    
    0x81, 0x02,                         //       INPUT (Data,Var,Abs)
    0xc0,                               //   END_COLLECTION
    0x05, 0x0d,	                        //   USAGE_PAGE (Digitizers)    
    0x09, 0x54,	                        //   USAGE (Actual count)
    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(Maximum Count)
    0x25, 0x02,                         //   LOGICAL_MAXIMUM (2)
    0xb1, 0x02,                         //   FEATURE (Data,Var,Abs) 
    0xc0,                               // END_COLLECTION
    0x09, 0x0E,                         // USAGE (Configuration)
    0xa1, 0x01,                         // COLLECTION (Application)
    0x85, REPORTID_FEATURE,             //   REPORT_ID (Feature(Configuration))              6
    0x09, 0x22,                         //   USAGE (Finger)              
    0xa1, 0x00,                         //   COLLECTION (physical)  12   
    0x09, 0x52,                         //    USAGE (Input Mode)         
    0x09, 0x53,                         //    USAGE (Device Index
    0x15, 0x00,                         //    LOGICAL_MINIMUM (0)      
    0x25, 0x0a,                         //    LOGICAL_MAXIMUM (10)
    0x75, 0x08,                         //    REPORT_SIZE (8)         
    0x95, 0x02,                         //    REPORT_COUNT (2)         
    0xb1, 0x02,                         //   FEATURE (Data,Var,Abs    
    0xc0,                               //   END_COLLECTION
    0xc0,                               // END_COLLECTION 
    0x05, 0x01,                         // USAGE_PAGE (Generic Desktop)     0
    0x09, 0x02,                         // USAGE (Mouse)                    2
    0xa1, 0x01,                         // COLLECTION (Application)         4
    0x85, REPORTID_MOUSE,               //   REPORT_ID (Mouse)              6
    0x09, 0x01,                         //   USAGE (Pointer)                8
    0xa1, 0x00,                         //   COLLECTION (Physical)          10
    0x05, 0x09,                         //     USAGE_PAGE (Button)          12
    0x19, 0x01,                         //     USAGE_MINIMUM (Button 1)     14
    0x29, 0x02,                         //     USAGE_MAXIMUM (Button 2)     16
    0x15, 0x00,                         //     LOGICAL_MINIMUM (0)          18
    0x25, 0x01,                         //     LOGICAL_MAXIMUM (1)          20
    0x75, 0x01,                         //     REPORT_SIZE (1)              22
    0x95, 0x02,                         //     REPORT_COUNT (2)             24
    0x81, 0x02,                         //     INPUT (Data,Var,Abs)         26
    0x95, 0x06,                         //     REPORT_COUNT (6)             28
    0x81, 0x03,                         //     INPUT (Cnst,Var,Abs)         30
    0x05, 0x01,                         //     USAGE_PAGE (Generic Desktop) 32
    0x09, 0x30,                         //     USAGE (X)                    34
    0x09, 0x31,                         //     USAGE (Y)                    36
    0x75, 0x10,                         //     REPORT_SIZE (16)             38
    0x95, 0x02,                         //     REPORT_COUNT (2)             40
    0x15, 0x00,                         //     LOGICAL_MINIMUM (0)          42
    0x26, 0xff, 0x7f,                   //     LOGICAL_MAXIMUM (32767)      44
    0x81, 0x02,                         //     INPUT (Data,Var,Abs)         47
    0xc0,                               //   END_COLLECTION                 49
    0xc0                                // END_COLLECTION                   50/51
    
};

レポート

  • 1バイト目はレポートID
    レポートID定数名タイプ876543210
    1REPORTID_MTOUCHINPUT-In RangeTip Switch
    Contact identifier
    X (16bit)
    (Xの続き)
    Y (16bit)
    (Yの続き)
    Contact identifier
    X (16bit)
    (Xの続き)
    Y (16bit)
    (Yの続き)
    Actual Contact count
    8REPORTID_MAX_COUNTFEATUREMaximum Contact Count(最大2)
    7REPORTID_FEATUREFEATUREInput Mode(0~10)
    Device Index(0~10)
    3REPORTID_MOUSEINPUT-Button2Button1
    X (16bit)
    (Xの続き)
    Y (16bit)
    (Yの続き)

トップレベルコレクション

  • the EloMT.c file includes a report descriptor that contains three top-level collections: the first contains two logical collections (one for each of the two supported physical contacts), the second is the feature report (also known as a configuration collection), and the third specifies usages for mouse support. Be aware that this driver can still support more than two concurrent contacts by using Hybrid mode.

参考