• AVR Freaks

USB PID managed POOl

Author
sebastien.decorme
Super Member
  • Total Posts : 463
  • Reward points : 0
  • Joined: 2005/08/19 12:37:52
  • Location: FRANCE , Pierrelatte
  • Status: offline
2013/02/10 06:39:16 (permalink)
0

USB PID managed POOl

Hi,
I'm trying (again) to use the PID with my USB interface.
I've some problem to understand exactly how the managed pool works.
I've read the PID pdf for the USB 2.0 but I don't understand how to calculate the exact size of the pool I need. And I don't really understand how to organize the pool between the effect block and the parameter block.
Is someone can make this post useful ?
 
Thanks
#1

12 Replies Related Threads

    chinzei
    Super Member
    • Total Posts : 2250
    • Reward points : 0
    • Joined: 2003/11/07 12:39:02
    • Location: Tokyo, Japan
    • Status: offline
    Re:USB PID managed POOl 2013/02/11 12:20:15 (permalink)
    0
    how to organize the pool between the effect block and the parameter block

    I assume you follow Driver-Managed model.

    The memory configuration is shown in this figure of the PID spec.

    At the start of RAM pool, an array of Effect blocks sits. And parameter blocks follow.

    When your device receives Set_Effect_Report (one of output report), your device copies this report to the Effect block array, specified by Effect_Block_Index of the report. Report_ID and Effect_Block_Index fields are stripped on the Effect array.

    When your device receives other "Set" reports, like Set_Envelope_Report, your device copies this report to the RAM pool, starting from the address specified by Parameter_Block_Offset field of the report. Host driver should give right address to this field. In this case also, Report_ID and Parameter_Block_Offset fields are stripped.

    When your device receives Effect Operation Report (Op Effect Start), your device plays the Effect on above Effect array, specified by Effect_Block_Index field of this report. Each effect has Type_Specific_Block_Offset field(s), which hold the offset of parameter block(s), associated to this effect.

    how to calculate the exact size of the pool I need

    The size of Effect block on the array is determined by Set_Effect_Report definition on the report descriptor. The size of other Parameters also determined by the report size of corresponding Set_xxx_Report (like Set_Envelope_Report).

    Each Effect should have associated parameter block(s), depending on the Effect type. See "Table 3: Effect Types" (p11) on the PID spec. This table shows the case of two-axes. If your device has three axes, Effects should have the third parameter block for the third axis.

    Counting up required Effects and Parameters on your application, you'll calculate the required RAM size.

    Tsuneo
    post edited by chinzei - 2013/02/11 12:21:48

    Attached Image(s)

    #2
    sebastien.decorme
    Super Member
    • Total Posts : 463
    • Reward points : 0
    • Joined: 2005/08/19 12:37:52
    • Location: FRANCE , Pierrelatte
    • Status: offline
    Re:USB PID managed POOl 2013/02/11 14:11:04 (permalink)
    0
    Hi,
    Of course I use this documentation and it is really hard too understand.
    To make my descriptor I use one found in this forum .
    With this descriptor I've 12 effects
     
        0x09,0x21,          //    Usage Set Effect Report
        0xA1,0x02,          //    Collection Datalink
           0x85,HID_OUT_Set_Effect_Report,    //    Report ID 1
           0x09,0x22,       //    Usage Effect Block Index
           0x15,0x01,       //    Logical Minimum 1
           0x25,0x28,       //    Logical Maximum 28h (40d)
           0x35,0x01,       //    Physical Minimum 1
           0x45,0x28,       //    Physical Maximum 28h (40d)
           0x75,0x08,       //    Report Size 8
           0x95,0x01,       //    Report Count 1
           0x91,0x02,       //    Output (Variable)
           0x09,0x25,       //    Usage Effect Type
           0xA1,0x02,       //    Collection Datalink
              0x09,0x26,    //    1  Usage ET Constant Force
              0x09,0x27,    //    2  Usage ET Ramp
              0x09,0x30,    //    3  Usage ET Square
              0x09,0x31,    //    4  Usage ET Sine
              0x09,0x32,    //    5  Usage ET Triangle
              0x09,0x33,    //    6  Usage ET Sawtooth Up
              0x09,0x34,    //    7  Usage ET Sawtooth Down
              0x09,0x40,    //    8  Usage ET Spring
              0x09,0x41,    //    9  Usage ET Damper
              0x09,0x42,    //    10 Usage ET Inertia
              0x09,0x43,    //    11 Usage ET Friction
              0x09,0x28,    //    12 Usage ET Custom Force Data
              0x25,0x0C,    //    Logical Maximum Ch (12d)
              0x15,0x01,    //    Logical Minimum 1
              0x35,0x01,    //    Physical Minimum 1
              0x45,0x0C,    //    Physical Maximum Ch (12d)
              0x75,0x08,    //    Report Size 8
              0x95,0x01,    //    Report Count 1
              0x91,0x00,    //    Output
           0xC0    ,        //    End Collection

           // DURATION EFFECT
           0x09,0x50,       //    Usage Duration
           0x09,0x54,       //    Usage Trigger Repeat Interval
           0x09,0x51,       //    Usage Sample Period
           0x15,0x00,       //    Logical Minimum 0
           0x26,0xFF,0x7F,  //    Logical Maximum 7FFFh (32767d)
           0x35,0x00,       //    Physical Minimum 0
           0x46,0xFF,0x7F,  //    Physical Maximum 7FFFh (32767d)
           0x66,0x03,0x10,  //    Unit (Eng Lin:Time)
           0x55,0xFD,       //    Unit Exponent FDh (10e-3)    (32767 / 32767)* 10e3 * 10e-3 = 1sec
           0x75,0x10,       //    Report Size 10h (16d)
           0x95,0x03,       //    Report Count 3
           0x91,0x02,       //    Output (Variable)
           0x55,0x00,       //    Unit Exponent 0
           0x66,0x00,0x00,  //    Unit 0

           // GAIN EFFECT
           // Resolution = 255/10000 = 0.0255
           0x09,0x52,       //    Usage Gain
           0x15,0x00,       //    Logical Minimum 0
           0x26,0xFF,0x00,  //    Logical Maximum FFh (255d)
           0x35,0x00,       //    Physical Minimum 0
           0x46,0x10,0x27,  //    Physical Maximum 2710h (10000d)
           0x75,0x08,       //    Report Size 8
           0x95,0x01,       //    Report Count 1
           0x91,0x02,       //    Output (Variable)

           // TRIGGER BUTTON
           // 8 buttons to  playback effect
           0x09,0x53,       //    Usage Trigger Button
           0x15,0x01,       //    Logical Minimum 1
           0x25,0x08,       //    Logical Maximum 8
           0x35,0x01,       //    Physical Minimum 1
           0x45,0x08,       //    Physical Maximum 8
           0x75,0x08,       //    Report Size 8
           0x95,0x01,       //    Report Count 1
           0x91,0x02,       //    Output (Variable)

           // AXE ENABLE
           // Define which axis will have effect
           0x09,0x55,       //    Usage Axes Enable
           0xA1,0x02,       //    Collection Datalink
              0x05,0x01,    //    Usage Page Generic Desktop
              0x09,0x30,    //    Usage X
              0x09,0x31,    //    Usage Y
              0x15,0x00,    //    Logical Minimum 0
              0x25,0x01,    //    Logical Maximum 1
              0x75,0x01,    //    Report Size 1
              0x95,0x02,    //    Report Count 2
              0x91,0x02,    //    Output (Variable)
           0xC0     ,       //    End Collection

           // PHYSICAL INTERFACE
           // Direction Enable
           0x05,0x0F,       //    Usage Page Physical Interface
           0x09,0x56,       //    Usage Direction Enable
           0x95,0x01,       //    Report Count 1
           0x91,0x02,       //    Output (Variable)
           0x95,0x05,       //    Report Count 5
           0x91,0x03,       //    Output (Constant, Variable)

           // DIRECTION
           // 2 instances of the Direction Usage for X and Y
           // ((255-0)/(3600-0)* 10e-2) = 360
           0x09,0x57,    //    Usage Direction
           0xA1,0x02,    //    Collection Datalink
              0x0B,0x01,0x00,0x0A,0x00,    //    Usage Ordinals: Instance 1
              0x0B,0x02,0x00,0x0A,0x00,    //    Usage Ordinals: Instance 2
              0x66,0x14,0x00,              //    Unit (Eng Rot:Angular Pos)
              0x55,0xFE,                   //    Unit Exponent FEh (254d)  10e-2
              0x15,0x00,                   //    Logical Minimum 0
              0x26,0xFF,0x00,              //    Logical Maximum FFh (255d)
              0x35,0x00,                   //    Physical Minimum 0
              0x47,0xA0,0x8C,0x00,0x00,    //    Physical Maximum 8CA0h (36000d) : 36000*10e-2 = 360°
              0x66,0x00,0x00,              //    Unit 0
              0x75,0x08,                   //    Report Size 8
              0x95,0x02,                   //    Report Count 2
              0x91,0x02,                   //    Output (Variable)
              0x55,0x00,                   //    Unit Exponent 0
              0x66,0x00,0x00,              //    Unit 0
           0xC0     ,         //    End Collection

           //PHYSICAL INTERFACE
           // Start playback delay
           0x05,0x0F,         //    Usage Page Physical Interface
           0x09,0xA7,         //    Usage Start Delay
           0x66,0x03,0x10,    //    Unit (Eng Lin:Time)
           0x55,0xFD,         //    Unit Exponent FDh (10e-3)
           0x15,0x00,         //    Logical Minimum 0
           0x26,0xFF,0x7F,    //    Logical Maximum 7FFFh (32767d)
           0x35,0x00,         //    Physical Minimum 0
           0x46,0xFF,0x7F,    //    Physical Maximum 7FFFh (32767d) (32767 / 32767)* 10e3 * 10e-3 = 1sec
           0x75,0x10,         //    Report Size 10h (16d)
           0x95,0x01,         //    Report Count 1
           0x91,0x02,         //    Output (Variable)
           0x66,0x00,0x00,    //    Unit 0
           0x55,0x00,         //    Unit Exponent 0
        0xC0     ,    //    End Collection

    So with this I've 12 effect block
     
    Effect Type                    1 byte
    Duration                        2 bytes
    Trigger Repeat Interval 2 bytes
    Sample period               2 bytes
    Gain                               1 byte
    Trigger button               1 byte
    Axe X enable                 1 bit
    Axe Y enable                 1 bit
    Direction Enable            5 bits
                                           miss 1 bit ??
    Ordinal 1                        1 byte (don't really understand what it is !!!)
    Ordinal 2                        1 byte (don't really understand what it is !!!)
    Start delay                     2 bytes

    The sum give me 13 byte
    but with USBLyzer I can log this  not the right size
    01 06 08 FF FF 00 00 01 00 FF FF 04 00 00 00 00
    Output Report (ID 1)
    Usage            Range Lg/Ph   Value
    ET Spring        Off..On            On
    Direction Enable Off..On       On
    Effect Block Index [1..40]      6
    Duration          [0..32767]     65535
    Trigger Repeat Interval [0..32767] 0
    Sample Period [0..32767] 1
    Gain                [0..255]/[0..10000] 255
    Trigger Button [1..8] 255
    Ordinal 1         [0..255]/[0..36000] 0
    Ordinal 2         [0..255]/[0..36000] 0
    Start Delay      [0..32767] 0  
    Could you explain why the data are not the same as the descriptor ?
     
    I've read the table 3 too and I don't really understand how it works too , I'm not english so sometime translations are really Hard :-)
     
    Here is the descriptor I use
     
    0x05,0x01,        //  USAGE_PAGE (Generic Desktop)
      0x09,0x04,        //  USAGE (Game Pad)
      0xA1,0x01,        //  COLLECTION (Application)
        0x85,0x01,        //  Report ID 1
        0x05,0x01,        //  USAGE_PAGE (Generic Desktop)
        0x09,0x39,                              //  USAGE(Hat Switch1)
        0x15,0x00,        //  LOGICAL_MINIMUM(1)
        0x25,0x07,        //  LOGICAL_MAXIMUM(7)
        0x35,0x00,        //  LOGICAL_MAXIMUM(1)
        0x46,0x3B,0x01,   //  PHYSICAL_MAXIMUM(315)
        0x65,0x14,        //  UNIT(Eng Rot:Angular Pos)
        0x75,0x04,        //  REPORT_SIZE(4)
        0x95,0x01,        //  REPORT_COUNT(1)
        0x81,0x02,        //  INPUT(Data,Var,Abs,Null)
        0x75,0x01,        //  REPORT_SIZE(1)
        0x95,0x04,        //  REPORT_COUNT(4)
        0x81,0x03,        //  INPUT(Data,Var,Abs,Null)
        0x09,0x39,                              //  USAGE(Hat Switch2)
        0x15,0x00,        //  LOGICAL_MINIMUM(1)
        0x25,0x07,        //  LOGICAL_MAXIMUM(7)
        0x35,0x00,        //  LOGICAL_MAXIMUM(1)
        0x46,0x3B,0x01,   //  PHYSICAL_MAXIMUM(315)
        0x65,0x14,        //  UNIT(Eng Rot:Angular Pos)
        0x75,0x04,        //  REPORT_SIZE(4)
        0x95,0x01,        //  REPORT_COUNT(1)
        0x81,0x02,        //  INPUT(Data,Var,Abs,Null)
        0x75,0x01,        //  REPORT_SIZE(1)
        0x95,0x04,        //  REPORT_COUNT(4)
        0x81,0x03,        //  INPUT(Data,Var,Abs,Null)
        0x09,0x39,                              //  USAGE(Hat Switch3)
        0x15,0x00,        //  LOGICAL_MINIMUM(1)
        0x25,0x07,        //  LOGICAL_MAXIMUM(7)
        0x35,0x00,        //  LOGICAL_MAXIMUM(1)
        0x46,0x3B,0x01,   //  PHYSICAL_MAXIMUM(315)
        0x65,0x14,        //  UNIT(Eng Rot:Angular Pos)
        0x75,0x04,        //  REPORT_SIZE(4)
        0x95,0x01,        //  REPORT_COUNT(1)
        0x81,0x02,        //  INPUT(Data,Var,Abs,Null)
        0x75,0x01,        //  REPORT_SIZE(1)
        0x95,0x04,        //  REPORT_COUNT(4)
        0x81,0x03,        //  INPUT(Data,Var,Abs,Null)
        0x09,0x39,                              //  USAGE(Hat Switch4)
        0x15,0x00,        //  LOGICAL_MINIMUM(1)
        0x25,0x07,        //  LOGICAL_MAXIMUM(7)
        0x35,0x00,        //  LOGICAL_MAXIMUM(1)
        0x46,0x3B,0x01,   //  PHYSICAL_MAXIMUM()
        0x65,0x14,        //  UNIT(Eng Rot:Angular Pos)
        0x75,0x04,        //  REPORT_SIZE(4)
        0x95,0x01,        //  REPORT_COUNT(1)
        0x81,0x02,        //  INPUT(Data,Var,Abs,Null)
        0x75,0x01,        //  REPORT_SIZE(1)
        0x95,0x04,        //  REPORT_COUNT(4)
        0x81,0x03,        //  INPUT(Data,Var,Abs,Null)
        0x26,0xFF,0x07,   //  LOGICAL_MAXIMUM(32767)     Analog Axis
        0x46,0xFF,0x07,   //  PHYSICAL_MAXIMUM(32767)
        0x09,0x30,        //  USAGE(X)
        0x09,0x31,        //  USAGE(Y)
        0x09,0x32,        //  USAGE(Z)
        0x09,0x33,        //  USAGE(Rx)
        0x09,0x34,        //  USAGE(Ry)
        0x09,0x35,        //  USAGE(Rz)
        0x09,0x36,        //  USAGE(Slider)
        0x09,0x37,        //  USAGE(Dial)
        0x75,0x10,        //  REPORT_SIZE(16)
        0x95,0x08,        //  REPORT_COUNT(8)
        0x81,0x02,        //  INPUT(Data,Var,Abs)
        0x05,0x09,                              //  USAGE_PAGE(Button)
        0x15,0x00,        //  LOGICAL_MINIMUM(0)
        0x25,0x01,        //  LOGICAL_MAXIMUM(1)
        0x35,0x00,        //  PHYSICAL_MINIMUM(0)
        0x45,0x01,        //  PHYSICAL_MAXIMUM(1)
        0x19,0x01,        //  USAGE_MINIMUM(Button 1)
        0x29,0x020,       //  USAGE_MAXIMUM(Button 32)
        0x75,0x01,        //  REPORT_SIZE(1)
        0x95,0x20,        //  REPORT_COUNT(32)
        0x81,0x02,        //  INPUT(Data,Var,Abs)
           
        0x05,0x0F,       //    Usage Page Physical Interface
        0x09,0x92,       //    Usage PID State report
        0xA1,0x02,       //    Collection Datalink (logical)
           0x85,0x02,    //    Report ID 2
           0x09,0x9F,    //    Usage Device is Pause
           0x09,0xA0,    //    Usage Actuators Enabled
           0x09,0xA4,    //    Usage Safety Switch
           0x09,0xA5,    //    Usage Actuator Override Switch
           0x09,0xA6,    //    Usage Actuator Power
           0x15,0x00,    //    Logical Minimum 0
           0x25,0x01,    //    Logical Maximum 1
           0x35,0x00,    //    Physical Minimum 0
           0x45,0x01,    //    Physical Maximum 1
           0x75,0x01,    //    Report Size 1
           0x95,0x05,    //    Report Count 5
           0x81,0x02,    //    Input (Variable)
           0x95,0x03,    //    Report Count 3
           0x81,0x03,    //    Input (Constant, Variable)
           0x09,0x94,    //    Usage Effect Playing
           0x15,0x00,    //    Logical Minimum 0
           0x25,0x01,    //    Logical Maximum 1
           0x35,0x00,    //    Physical Minimum 0
           0x45,0x01,    //    Physical Maximum 1
           0x75,0x01,    //    Report Size 1
           0x95,0x01,    //    Report Count 1
           0x81,0x02,    //    Input (Variable)
           0x09,0x22,    //    Usage Effect Block Index
           0x15,0x01,    //    Logical Minimum 1
           0x25,0x28,    //    Logical Maximum 28h (40d)
           0x35,0x01,    //    Physical Minimum 1
           0x45,0x28,    //    Physical Maximum 28h (40d)
           0x75,0x07,    //    Report Size 7
           0x95,0x01,    //    Report Count 1
           0x81,0x02,    //    Input (Variable)
        0xC0,           // End Collection


        0x09,0x21,    //    Usage Set Effect Report
        0xA1,0x02,    //    Collection Datalink (Logical)                           1.2
           0x85,0x01,    //    Report ID 1
           0x09,0x22,    //    Usage Effect Block Index
           0x15,0x01,    //    Logical Minimum 1
           0x25,0x28,    //    Logical Maximum 28h (40d)
           0x35,0x01,    //    Physical Minimum 1
           0x45,0x28,    //    Physical Maximum 28h (40d) // The device can store 40 effects
           0x75,0x08,    //    Report Size 8
           0x95,0x01,    //    Report Count 1
           0x91,0x02,    //    Output (Variable)
           0x09,0x25,    //    Usage Effect Type
           0xA1,0x02,    //    Collection Datalink                                  1.2.1
              0x09,0x26,    //    Usage ET Constant Force
              0x09,0x27,    //    Usage ET Ramp
              0x09,0x30,    //    Usage ET Square
              0x09,0x31,    //    Usage ET Sine
              0x09,0x32,    //    Usage ET Triangle
              0x09,0x33,    //    Usage ET Sawtooth Up
              0x09,0x34,    //    Usage ET Sawtooth Down
              0x09,0x40,    //    Usage ET Spring
              0x09,0x41,    //    Usage ET Damper
              0x09,0x42,    //    Usage ET Inertia
              0x09,0x43,    //    Usage ET Friction
              0x09,0x28,    //    Usage ET Custom Force Data
              0x25,0x0C,    //    Logical Maximum Ch (12d)
              0x15,0x01,    //    Logical Minimum 1
              0x35,0x01,    //    Physical Minimum 1
              0x45,0x0C,    //    Physical Maximum Ch (12d)
              0x75,0x08,    //    Report Size 8
              0x95,0x01,    //    Report Count 1
              0x91,0x00,    //    Output
           0xC0    ,          //    End Collection                                  1.2.1 End

           // DURATION EFFECT
           0x09,0x50,         //    Usage Duration
           0x09,0x54,         //    Usage Trigger Repeat Interval
           0x09,0x51,         //    Usage Sample Period
           0x15,0x00,         //    Logical Minimum 0
           0x26,0xFF,0x7F,    //    Logical Maximum 7FFFh (32767d)
           0x35,0x00,         //    Physical Minimum 0
           0x46,0xFF,0x7F,    //    Physical Maximum 7FFFh (32767d)
           0x66,0x03,0x10,    //    Unit (Eng Lin:Time)
           0x55,0xFD,         //    Unit Exponent FDh (10e-3)    (32767 / 32767)* 10e3 * 10e-3 = 1sec
           0x75,0x10,         //    Report Size 10h (16d)
           0x95,0x03,         //    Report Count 3
           0x91,0x02,         //    Output (Variable)
           0x55,0x00,         //    Unit Exponent 0
           0x66,0x00,0x00,    //    Unit 0


           // GAIN EFFECT
           // Resolution = 255/10000 = 0.0255
           0x09,0x52,         //    Usage Gain
           0x15,0x00,         //    Logical Minimum 0
           0x26,0xFF,0x00,    //    Logical Maximum FFh (255d)
           0x35,0x00,         //    Physical Minimum 0
           0x46,0x10,0x27,    //    Physical Maximum 2710h (10000d)
           0x75,0x08,         //    Report Size 8
           0x95,0x01,         //    Report Count 1
           0x91,0x02,         //    Output (Variable)

           // TRIGGER BUTTON
           // 8 buttons to  playback effect
           0x09,0x53,         //    Usage Trigger Button
           0x15,0x01,         //    Logical Minimum 1
           0x25,0x08,         //    Logical Maximum 8
           0x35,0x01,         //    Physical Minimum 1
           0x45,0x08,         //    Physical Maximum 8
           0x75,0x08,         //    Report Size 8
           0x95,0x01,         //    Report Count 1
           0x91,0x02,         //    Output (Variable)

           // AXE ENABLE
           // Define which axis will have effect
           0x09,0x55,         //    Usage Axes Enable
           0xA1,0x02,         //    Collection Datalink                             1.2.2
              0x05,0x01,    //    Usage Page Generic Desktop
              0x09,0x30,    //    Usage X
              0x09,0x31,    //    Usage Y
              0x15,0x00,    //    Logical Minimum 0
              0x25,0x01,    //    Logical Maximum 1
              0x75,0x01,    //    Report Size 1
              0x95,0x02,    //    Report Count 2
              0x91,0x02,    //    Output (Variable)
           0xC0,            // End Collection                                       1.2.2 End

           // PHYSICAL INTERFACE
           // Direction Enable
           0x05,0x0F,    //    Usage Page Physical Interface
           0x09,0x56,    //    Usage Direction Enable
           0x95,0x01,    //    Report Count 1
           0x91,0x02,    //    Output (Variable)
           0x95,0x05,    //    Report Count 5
           0x91,0x03,    //    Output (Constant, Variable)

           // DIRECTION
           // 2 instances of the Direction Usage for X and Y
           // ((255-0)/(3600-0)* 10e-2) = 360
           0x09,0x57,    //    Usage Direction
           0xA1,0x02,    //    Collection Datalink                                  1.2.3
              0x0B,0x01,0x00,0x0A,0x00,    //    Usage Ordinals: Instance 1
              0x0B,0x02,0x00,0x0A,0x00,    //    Usage Ordinals: Instance 2
              0x66,0x14,0x00,              //    Unit (Eng Rot:Angular Pos)
              0x55,0xFE,                   //    Unit Exponent FEh (254d)  10e-2
              0x15,0x00,                   //    Logical Minimum 0
              0x26,0xFF,0x00,              //    Logical Maximum FFh (255d)
              0x35,0x00,                   //    Physical Minimum 0
              0x47,0xA0,0x8C,0x00,0x00,    //    Physical Maximum 8CA0h (36000d)
              0x66,0x00,0x00,              //    Unit (None)
              0x75,0x08,                   //    Report Size 8
              0x95,0x02,                   //    Report Count 2
              0x91,0x02,                   //    Output (Variable)
              0x55,0x00,                   //    Unit Exponent 0
              0x66,0x00,0x00,              //    Unit (None)
           0xC0     ,         //    End Collection                                  1.2.3 End

           //PHYSICAL INTERFACE
           // Start playback delay
           0x05,0x0F,         //    Usage Page Physical Interface
           0x09,0xA7,         //    USAGE (Start Delay)
           0x66,0x03,0x10,    //    Unit (Eng Lin:Time)
           0x55,0xFD,         //    Unit Exponent FDh (10e-3)
           0x15,0x00,         //    Logical Minimum 0
           0x26,0xFF,0x7F,    //    Logical Maximum 7FFFh (32767d)
           0x35,0x00,         //    Physical Minimum 0
           0x46,0xFF,0x7F,    //    Physical Maximum 7FFFh (32767d) (32767 / 32767)* 10e3 * 10e-3 = 1sec
           0x75,0x10,         //    Report Size 10h (16d)
           0x95,0x01,         //    Report Count 1
           0x91,0x02,         //    Output (Variable)
           0x66,0x00,0x00,    //    Unit 0
           0x55,0x00,         //    Unit Exponent 0
        0xC0     ,    //    End Collection                                          1.2 End

        0x05,0x0F,    //    Usage Page Physical Interface
        //Envelope Block Parameters
        //Set Envelope Report
        0x09,0x5A,    //    Usage Set Envelope Report
        0xA1,0x02,    //    Collection Datalink                                     1.3
           0x85,0x02,         //    Report ID 2
           // pg8 PID 1.0
           0x09,0x22,         //    Usage Effect Block Index determines the location in the Effect Parameter Block
                              //    Array where the Effect Parameter Block will be loaded
           0x15,0x01,         //    Logical Minimum 1
           0x25,0x28,         //    Logical Maximum 28h (40d)
           0x35,0x01,         //    Physical Minimum 1
           0x45,0x28,         //    Physical Maximum 28h (40d)
           0x75,0x08,         //    Report Size 8
           0x95,0x01,         //    Report Count 1
           0x91,0x02,         //    Output (Variable)
           // pg11 PID 1.0
           0x09,0x5B,         //    Usage Attack Level
           0x09,0x5D,         //    Usage Fade Level
           0x15,0x00,         //    Logical Minimum 0
           0x26,0xFF,0x00,    //    Logical Maximum FFh (255d)
           0x35,0x00,         //    Physical Minimum 0
           0x46,0x10,0x27,    //    Physical Maximum 2710h (10000d)
           0x95,0x02,         //    Report Count 2
           0x91,0x02,         //    Output (Variable)

           0x09,0x5C,         //    Usage Attack Time
           0x09,0x5E,         //    Usage Fade Time
           0x66,0x03,0x10,    //    Unit (Eng Lin:Time)
           0x55,0xFD,         //    Unit Exponent FDh (10e-3)
           0x26,0xFF,0x7F,    //    Logical Maximum 7FFFh (32767d)
           0x46,0xFF,0x7F,    //    Physical Maximum 7FFFh (32767d) (32767 / 32767)* 10e3 * 10e-3 = 1sec
           0x75,0x10,         //    Report Size 10h (16d)
           0x91,0x02,         //    Output (Variable)
           0x45,0x00,         //    Physical Maximum 0
           0x66,0x00,0x00,    //    Unit 0
           0x55,0x00,         //    Unit Exponent 0
        0xC0     ,            //    End Collection                                  1.3 End

        //Set Condition Report
        0x09,0x5F,    //    Usage Set Condition Report
        0xA1,0x02,    //    Collection Datalink                                     1.4
           0x85,0x03,    //    Report ID 3
           0x09,0x22,    //    Usage Effect Block Index determines the location in the Effect Parameter Block
                         //    Array where the Effect Parameter Block will be loaded
           0x15,0x01,    //    Logical Minimum 1
           0x25,0x28,    //    Logical Maximum 28h (40d)
           0x35,0x01,    //    Physical Minimum 1
           0x45,0x28,    //    Physical Maximum 28h (40d)
           0x75,0x08,    //    Report Size 8
           0x95,0x01,    //    Report Count 1
           0x91,0x02,    //    Output (Variable)

           0x09,0x23,    //    Usage Parameter Block Offset represents the byte offset into the Parameter
                         //    block pool where the Parameter Block is stored.
           0x15,0x00,    //    Logical Minimum 0
           0x25,0x01,    //    Logical Maximum 1
           0x35,0x00,    //    Physical Minimum 0
           0x45,0x01,    //    Physical Maximum 1
           0x75,0x04,    //    Report Size 4
           0x95,0x01,    //    Report Count 1
           0x91,0x02,    //    Output (Variable)

           0x09,0x58,    //    Usage Type Specific Block Offset
           0xA1,0x02,    //    Collection Datalink                                  1.4.1
              0x0B,0x01,0x00,0x0A,0x00,    //    Usage Ordinals: Instance 1
              0x0B,0x02,0x00,0x0A,0x00,    //    Usage Ordinals: Instance 2
              0x75,0x02,                   //    Report Size 2
              0x95,0x02,                   //    Report Count 2
              0x91,0x02,                   //    Output (Variable)
           0xC0     ,         //    End Collection                                  1.4.1 End
           0x15,0x80,         //    Logical Minimum 80h (-128d)
           0x25,0x7F,         //    Logical Maximum 7Fh (127d)
           0x36,0xF0,0xD8,    //    Physical Minimum D8F0h (-10000d)
           0x46,0x10,0x27,    //    Physical Maximum 2710h (10000d)


           0x09,0x60,         //    Usage CP Offset
                              //    The Normalized Center Point Offset. Offset from axis 0 position.
           0x75,0x08,         //    Report Size 8
           0x95,0x01,         //    Report Count 1
           0x91,0x02,         //    Output (Variable)
           0x36,0xF0,0xD8,    //    Physical Minimum D8F0h (-10000d)
           0x46,0x10,0x27,    //    Physical Maximum 2710h (10000d)

           0x09,0x61,         //    Usage Positive Coefficient
                              //    The Normalized coefficient constant on the positive side of the neutral position.
           0x09,0x62,         //    Usage Negative Coefficient
                              //    The Normalized coefficient constant on the negative side of the neutral position.
           0x95,0x02,         //    Report Count 2
           0x91,0x02,         //    Output (Variable)
           0x15,0x00,         //    Logical Minimum 0
           0x26,0xFF,0x00,    //    Logical Maximum FFh (255d)
           0x35,0x00,         //    Physical Minimum 0
           0x46,0x10,0x27,    //    Physical Maximum 2710h (10000d)

           0x09,0x63,         //    Usage Positive Saturation
                              //    The Normalized maximum positive force output
           0x09,0x64,         //    Usage Negative Saturation
                              //    The Normalized maximum negative force output
           0x75,0x08,         //    Report Size 8
           0x95,0x02,         //    Report Count 2
           0x91,0x02,         //    Output (Variable)
           0x09,0x65,         //    Usage Dead Band
                              //    The region around CP Offsetwhere the condition is not
                              //    active. In other words, the condition is not active between Offset
                              //    ? Dead Bandand Offset+ Dead Band. This value is Normalized.
           0x46,0x10,0x27,    //    Physical Maximum 2710h (10000d)
           0x95,0x01,         //    Report Count 1
           0x91,0x02,         //    Output (Variable)
        0xC0     ,    //    End Collection                                          1.4 End

        // Set Periodic Report
        // Once started a periodic effect will loop every Period until a Pause or Stop command is received
        0x09,0x6E,    //    Usage Set Periodic Report
        0xA1,0x02,    //    Collection Datalink                                     1.5
           0x85,0x04,                   //    Report ID 4
           0x09,0x22,                   //    Usage Effect Block Index
           0x15,0x01,                   //    Logical Minimum 1
           0x25,0x28,                   //    Logical Maximum 28h (40d)
           0x35,0x01,                   //    Physical Minimum 1
           0x45,0x28,                   //    Physical Maximum 28h (40d)
           0x75,0x08,                   //    Report Size 8
           0x95,0x01,                   //    Report Count 1
           0x91,0x02,                   //    Output (Variable)

           0x09,0x70,                   //    Usage Magnitude
           0x15,0x00,                   //    Logical Minimum 0
           0x26,0xFF,0x00,              //    Logical Maximum FFh (255d)
           0x35,0x00,                   //    Physical Minimum 0
           0x46,0x10,0x27,              //    Physical Maximum 2710h (10000d)
           0x75,0x08,                   //    Report Size 8
           0x95,0x01,                   //    Report Count 1
           0x91,0x02,                   //    Output (Variable)

           0x09,0x6F,                   //    Usage Offset
           0x15,0x80,                   //    Logical Minimum 80h (-128d)
           0x25,0x7F,                   //    Logical Maximum 7Fh (127d)
           0x36,0xF0,0xD8,              //    Physical Minimum D8F0h (-10000d)
           0x46,0x10,0x27,              //    Physical Maximum 2710h (10000d)
           0x95,0x01,                   //    Report Count 1
           0x91,0x02,                   //    Output (Variable)

           0x09,0x71,                   //    Usage Phase
           0x66,0x14,0x00,              //    Unit (Eng Rot:Angular Pos)
           0x55,0xFE,                   //    Unit Exponent FEh (10e-2)
           0x15,0x00,                   //    Logical Minimum 0
           0x26,0xFF,0x00,              //    Logical Maximum FFh (255d)
           0x35,0x00,                   //    Physical Minimum 0
           0x47,0xA0,0x8C,0x00,0x00,    //    Physical Maximum 8CA0h (36000d) : 36000*10e-2 = 360°
           0x91,0x02,                   //    Output (Variable)

           0x09,0x72,                   //    Usage Period
           0x26,0xFF,0x7F,              //    Logical Maximum 7FFFh (32767d)
           0x46,0xFF,0x7F,              //    Physical Maximum 7FFFh (32767d)
           0x66,0x03,0x10,              //    Unit (Eng Lin:Time)
           0x55,0xFD,                   //    Unit Exponent FDh (10e-3)
           0x75,0x10,                   //    Report Size 10h (16d)
           0x95,0x01,                   //    Report Count 1
           0x91,0x02,                   //    Output (Variable)
           0x66,0x00,0x00,              //    Unit 0
           0x55,0x00,                   //    Unit Exponent 0
        0xC0     ,    // End Collection                                             1.5 End

        0x09,0x73,    //    Usage Set Constant Force Report
        0xA1,0x02,    //    Collection Datalink                                     1.6
           0x85,0x05,         //    Report ID 5
           0x09,0x22,         //    Usage Effect Block Index
           0x15,0x01,         //    Logical Minimum 1
           0x25,0x28,         //    Logical Maximum 28h (40d)
           0x35,0x01,         //    Physical Minimum 1
           0x45,0x28,         //    Physical Maximum 28h (40d)
           0x75,0x08,         //    Report Size 8
           0x95,0x01,         //    Report Count 1
           0x91,0x02,         //    Output (Variable)
           0x09,0x70,         //    Usage Magnitude
           0x16,0x01,0xFF,    //    Logical Minimum FF01h (-255d)
           0x26,0xFF,0x00,    //    Logical Maximum FFh (255d)
           0x36,0xF0,0xD8,    //    Physical Minimum D8F0h (-10000d)
           0x46,0x10,0x27,    //    Physical Maximum 2710h (10000d)
           0x75,0x10,         //    Report Size 10h (16d)
           0x95,0x01,         //    Report Count 1
           0x91,0x02,         //    Output (Variable)
        0xC0     ,    //    End Collection                                          1.6 End

        0x09,0x74,    //    Usage Set Ramp Force Report
        0xA1,0x02,    //    Collection Datalink                                     1.7
           0x85,0x06,         //    Report ID 6
           0x09,0x22,         //    Usage Effect Block Index
           0x15,0x01,         //    Logical Minimum 1
           0x25,0x28,         //    Logical Maximum 28h (40d)
           0x35,0x01,         //    Physical Minimum 1
           0x45,0x28,         //    Physical Maximum 28h (40d)
           0x75,0x08,         //    Report Size 8
           0x95,0x01,         //    Report Count 1
           0x91,0x02,         //    Output (Variable)
           0x09,0x75,         //    Usage Ramp Start
           0x09,0x76,         //    Usage Ramp End
           0x15,0x80,         //    Logical Minimum 80h (-128d)
           0x25,0x7F,         //    Logical Maximum 7Fh (127d)
           0x36,0xF0,0xD8,    //    Physical Minimum D8F0h (-10000d)
           0x46,0x10,0x27,    //    Physical Maximum 2710h (10000d)
           0x75,0x08,         //    Report Size 8
           0x95,0x02,         //    Report Count 2
           0x91,0x02,         //    Output (Variable)
        0xC0     ,    //    End Collection                                          1.7 End

        0x09,0x68,    //    Usage Custom Force Data Report
        0xA1,0x02,    //    Collection Datalink                                     1.8
           0x85,0x07,         //    Report ID 7
           0x09,0x22,         //    Usage Effect Block Index
           0x15,0x01,         //    Logical Minimum 1
           0x25,0x28,         //    Logical Maximum 28h (40d)
           0x35,0x01,         //    Physical Minimum 1
           0x45,0x28,         //    Physical Maximum 28h (40d)
           0x75,0x08,         //    Report Size 8
           0x95,0x01,         //    Report Count 1
           0x91,0x02,         //    Output (Variable)
           0x09,0x6C,         //    Usage Custom Force Data Offset
           0x15,0x00,         //    Logical Minimum 0
           0x26,0x10,0x27,    //    Logical Maximum 2710h (10000d)
           0x35,0x00,         //    Physical Minimum 0
           0x46,0x10,0x27,    //    Physical Maximum 2710h (10000d)
           0x75,0x10,         //    Report Size 10h (16d)
           0x95,0x01,         //    Report Count 1
           0x91,0x02,         //    Output (Variable)
           0x09,0x69,         //    Usage Custom Force Data
           0x15,0x81,         //    Logical Minimum 81h (-127d)
           0x25,0x7F,         //    Logical Maximum 7Fh (127d)
           0x35,0x00,         //    Physical Minimum 0
           0x46,0xFF,0x00,    //    Physical Maximum FFh (255d)
           0x75,0x08,         //    Report Size 8
           0x95,0x0C,         //    Report Count Ch (12d)
           0x92,0x02,0x01,    //       Output (Variable, Buffered)
        0xC0     ,    //    End Collection                                          1.8 End

        0x09,0x66,    //    Usage Download Force Sample
        0xA1,0x02,    //    Collection Datalink                                     1.9
           0x85,0x08,         //    Report ID 8
           0x05,0x01,         //    Usage Page Generic Desktop
           0x09,0x30,         //    Usage X
           0x09,0x31,         //    Usage Y
           0x15,0x81,         //    Logical Minimum 81h (-127d)
           0x25,0x7F,         //    Logical Maximum 7Fh (127d)
           0x35,0x00,         //    Physical Minimum 0
           0x46,0xFF,0x00,    //    Physical Maximum FFh (255d)
           0x75,0x08,         //    Report Size 8
           0x95,0x02,         //    Report Count 2
           0x91,0x02,         //    Output (Variable)
        0xC0     ,   //    End Collection                                           1.9 End

        0x05,0x0F,   //    Usage Page Physical Interface
        0x09,0x77,   //    Usage Effect Operation Report
        0xA1,0x02,   //    Collection Datalink                                      1.10
           0x85,0x0A,    //    Report ID Ah (10d)
           0x09,0x22,    //    Usage Effect Block Index
           0x15,0x01,    //    Logical Minimum 1
           0x25,0x28,    //    Logical Maximum 28h (40d)
           0x35,0x01,    //    Physical Minimum 1
           0x45,0x28,    //    Physical Maximum 28h (40d)
           0x75,0x08,    //    Report Size 8
           0x95,0x01,    //    Report Count 1
           0x91,0x02,    //    Output (Variable)
           0x09,0x78,    //    Usage Effect Operation
           0xA1,0x02,    //    Collection Datalink                                  1.10.1
              0x09,0x79,    //    Usage Op Effect Start
              0x09,0x7A,    //    Usage Op Effect Start Solo
              0x09,0x7B,    //    Usage Op Effect Stop
              0x15,0x01,    //    Logical Minimum 1
              0x25,0x03,    //    Logical Maximum 3
              0x75,0x08,    //    Report Size 8
              0x95,0x01,    //    Report Count 1
              0x91,0x00,    //    Output
           0xC0     ,         //    End Collection                                  1.10.1 End
           0x09,0x7C,         //    Usage Loop Count
           0x15,0x00,         //    Logical Minimum 0
           0x26,0xFF,0x00,    //    Logical Maximum FFh (255d)
           0x35,0x00,         //    Physical Minimum 0
           0x46,0xFF,0x00,    //    Physical Maximum FFh (255d)
           0x91,0x02,         //    Output (Variable)
        0xC0     ,    //    End Collection                                          1.10 End

        0x09,0x90,    //    Usage PID Block Free Report
        0xA1,0x02,    //    Collection Datalink                                     1.11
           0x85,0x0B,    //    Report ID Bh (11d)
           0x09,0x22,    //    Usage Effect Block Index
           0x25,0x28,    //    Logical Maximum 28h (40d)
           0x15,0x01,    //    Logical Minimum 1
           0x35,0x01,    //    Physical Minimum 1
           0x45,0x28,    //    Physical Maximum 28h (40d)
           0x75,0x08,    //    Report Size 8
           0x95,0x01,    //    Report Count 1
           0x91,0x02,    //    Output (Variable)
        0xC0     ,    //    End Collection                                          1.11 End

        0x09,0x96,    //    Usage PID Device Control
        0xA1,0x02,    //    Collection Datalink                                     1.12
           0x85,0x0C,    //    Report ID Ch (12d)
           0x09,0x97,    //    Usage DC Enable Actuators
           0x09,0x98,    //    Usage DC Disable Actuators
           0x09,0x99,    //    Usage DC Stop All Effects
           0x09,0x9A,    //    Usage DC Device Reset
           0x09,0x9B,    //    Usage DC Device Pause
           0x09,0x9C,    //    Usage DC Device Continue
           0x15,0x01,    //    Logical Minimum 1
           0x25,0x06,    //    Logical Maximum 6
           0x75,0x08,    //    Report Size 8
           0x95,0x01,    //    Report Count 1
           0x91,0x00,    //    Output
        0xC0     ,    //    End Collection                                          1.12 End

        0x09,0x7D,    //    Usage Device Gain Report
        0xA1,0x02,    //    Collection Datalink                                     1.13
           0x85,0x0D,         //    Report ID Dh (13d)
           0x09,0x7E,         //    Usage Device Gain
           0x15,0x00,         //    Logical Minimum 0
           0x26,0xFF,0x00,    //    Logical Maximum FFh (255d)
           0x35,0x00,         //    Physical Minimum 0
           0x46,0x10,0x27,    //    Physical Maximum 2710h (10000d)
           0x75,0x08,         //    Report Size 8
           0x95,0x01,         //    Report Count 1
           0x91,0x02,         //    Output (Variable)
        0xC0     ,            //    End Collection                                  1.13 End

        0x09,0x6B,    //    Usage Set Custom Force Report
        0xA1,0x02,    //    Collection Datalink                                     1.14
           0x85,0x0E,         //    Report ID Eh (14d)
           0x09,0x22,         //    Usage Effect Block Index
           0x15,0x01,         //    Logical Minimum 1
           0x25,0x28,         //    Logical Maximum 28h (40d)
           0x35,0x01,         //    Physical Minimum 1
           0x45,0x28,         //    Physical Maximum 28h (40d)
           0x75,0x08,         //    Report Size 8
           0x95,0x01,         //    Report Count 1
           0x91,0x02,         //    Output (Variable)
           0x09,0x6D,         //    Usage Sample Count
           0x15,0x00,         //    Logical Minimum 0
           0x26,0xFF,0x00,    //    Logical Maximum FFh (255d)
           0x35,0x00,         //    Physical Minimum 0
           0x46,0xFF,0x00,    //    Physical Maximum FFh (255d)
           0x75,0x08,         //    Report Size 8
           0x95,0x01,         //    Report Count 1
           0x91,0x02,         //    Output (Variable)
           0x09,0x51,         //    Usage Sample Period
           0x66,0x03,0x10,    //    Unit (Eng Lin:Time)
           0x55,0xFD,         //    Unit Exponent FDh (10e-3)
           0x15,0x00,         //    Logical Minimum 0
           0x26,0xFF,0x7F,    //    Logical Maximum 7FFFh (32767d)
           0x35,0x00,         //    Physical Minimum 0
           0x46,0xFF,0x7F,    //    Physical Maximum 7FFFh (32767d)
           0x75,0x10,         //    Report Size 10h (16d)
           0x95,0x01,         //    Report Count 1
           0x91,0x02,         //    Output (Variable)
           0x55,0x00,         //    Unit Exponent 0
           0x66,0x00,0x00,    //    Unit 0
        0xC0     ,    //    End Collection                                          1.14 End

        0x09,0xAB,    //    Usage Create New Effect Report
        0xA1,0x02,    //    Collection Datalink                                     1.15
           0x85,0x01,    //    Report ID 1
           0x09,0x25,    //    Usage Effect Type
           0xA1,0x02,    //    Collection Datalink
           0x09,0x26,    //    Usage ET Constant Force
           0x09,0x27,    //    Usage ET Ramp
           0x09,0x30,    //    Usage ET Square
           0x09,0x31,    //    Usage ET Sine
           0x09,0x32,    //    Usage ET Triangle
           0x09,0x33,    //    Usage ET Sawtooth Up
           0x09,0x34,    //    Usage ET Sawtooth Down
           0x09,0x40,    //    Usage ET Spring
           0x09,0x41,    //    Usage ET Damper
           0x09,0x42,    //    Usage ET Inertia
           0x09,0x43,    //    Usage ET Friction
           0x09,0x28,    //    Usage ET Custom Force Data
           0x25,0x0C,    //    Logical Maximum Ch (12d)
           0x15,0x01,    //    Logical Minimum 1
           0x35,0x01,    //    Physical Minimum 1
           0x45,0x0C,    //    Physical Maximum Ch (12d)
           0x75,0x08,    //    Report Size 8
           0x95,0x01,    //    Report Count 1
           0xB1,0x00,    //    Feature
        0xC0     ,    // End Collection                                             1.15 End
        0x05,0x01,         //    Usage Page Generic Desktop
        0x09,0x3B,         //    Usage Reserved
        0x15,0x00,         //    Logical Minimum 0
        0x26,0xFF,0x01,    //    Logical Maximum 1FFh (511d)
        0x35,0x00,         //    Physical Minimum 0
        0x46,0xFF,0x01,    //    Physical Maximum 1FFh (511d)
        0x75,0x0A,         //    Report Size Ah (10d)
        0x95,0x01,         //    Report Count 1
        0xB1,0x02,         //    Feature (Variable)
        0x75,0x06,         //    Report Size 6
        0xB1,0x01,         //    Feature (Constant)
     0xC0     ,    //    End Collection                                             1 End

     0x05,0x0F,    //    Usage Page Physical Interface
     0x09,0x89,    //    Usage Block Load Report
     0xA1,0x02,    //    Collection Datalink                                        2
        0x85,0x02,    //    Report ID 2
        0x09,0x22,    //    Usage Effect Block Index
        0x25,0x28,    //    Logical Maximum 28h (40d)
        0x15,0x01,    //    Logical Minimum 1
        0x35,0x01,    //    Physical Minimum 1
        0x45,0x28,    //    Physical Maximum 28h (40d)
        0x75,0x08,    //    Report Size 8
        0x95,0x01,    //    Report Count 1
        0xB1,0x02,    //    Feature (Variable)
        0x09,0x8B,    //    Usage Block Load Status
        0xA1,0x02,    //    Collection Datalink                                     2.1
           0x09,0x8C,    //    Usage Block Load Success
           0x09,0x8D,    //    Usage Block Load Full
           0x09,0x8E,    //    Usage Block Load Error
           0x25,0x03,    //    Logical Maximum 3
           0x15,0x01,    //    Logical Minimum 1
           0x35,0x01,    //    Physical Minimum 1
           0x45,0x03,    //    Physical Maximum 3
           0x75,0x08,    //    Report Size 8
           0x95,0x01,    //    Report Count 1
           0xB1,0x00,    //    Feature
        0xC0     ,                   // End Collection                              2.1 End
        0x09,0xAC,                   //    Usage RAM Pool Available
        0x15,0x00,                   //    Logical Minimum 0
        0x27,0xFF,0xFF,0x00,0x00,    //    Logical Maximum FFFFh (65535d)
        0x35,0x00,                   //    Physical Minimum 0
        0x47,0xFF,0xFF,0x00,0x00,    //    Physical Maximum FFFFh (65535d)
        0x75,0x10,                   //    Report Size 10h (16d)
        0x95,0x01,                   //    Report Count 1
        0xB1,0x00,                   //    Feature
     0xC0     ,    //    End Collection                                             2 End
     0x09,0x7F,    //    Usage PID Pool Report
     0xA1,0x02,    //    Collection Datalink                                        3
        0x85,0x03,                   //    Report ID 3
        0x09,0x80,                   //    Usage RAM Pool size
        0x75,0x10,                   //    Report Size 10h (16d)
        0x95,0x01,                   //    Report Count 1
        0x15,0x00,                   //    Logical Minimum 0
        0x35,0x00,                   //    Physical Minimum 0
        0x27,0xFF,0xFF,0x00,0x00,    //    Logical Maximum FFFFh (65535d)
        0x47,0xFF,0xFF,0x00,0x00,    //    Physical Maximum FFFFh (65535d)
        0xB1,0x02,                   //    Feature (Variable)
        0x09,0x83,                   //    Usage Simultaneous Effects Max
        0x26,0xFF,0x00,              //    Logical Maximum FFh (255d)
        0x46,0xFF,0x00,              //    Physical Maximum FFh (255d)
        0x75,0x08,                   //    Report Size 8
        0x95,0x01,                   //    Report Count 1
        0xB1,0x02,                   //    Feature (Variable)
        0x09,0xA9,                   //    Usage Device Managed Pool
        0x09,0xAA,                   //    Usage Shared Parameter Blocks
        0x75,0x01,                   //    Report Size 1
        0x95,0x02,                   //    Report Count 2
        0x15,0x00,                   //    Logical Minimum 0
        0x25,0x01,                   //    Logical Maximum 1
        0x35,0x00,                   //    Physical Minimum 0
        0x45,0x01,                   //    Physical Maximum 1
        0xB1,0x02,                   //    Feature (Variable)
        0x75,0x06,                   //    Report Size 6
        0x95,0x01,                   //    Report Count 1
        0xB1,0x03,                   //    Feature (Constant, Variable)

      0xC0                //  END_COLLECTION


     
    Thanks you
    post edited by sebastien.decorme - 2013/02/11 14:27:52
    #3
    chinzei
    Super Member
    • Total Posts : 2250
    • Reward points : 0
    • Joined: 2003/11/07 12:39:02
    • Location: Tokyo, Japan
    • Status: offline
    Re:USB PID managed POOl 2013/02/11 19:40:22 (permalink)
    0
    With this descriptor I've 12 effects
    So with this I've 12 effect block

    Not always. 12 at most.
    Your host application picks up required effects from these available effects on your device. The exact number of members on Effect blocks array is determined by your host application. The device doesn't need to be aware of this number, because the host driver should manage it in Driver-Managed model.

    The sum give me 13 byte
    Could you explain why the data are not the same as the descriptor ?

    Report ID         : 1 byte
    Effect Block Index: 1 byte

    Effect Type       : 1 byte
    Duration          : 2 bytes x 3
    Gain              : 1 byte
    Trigger Button    : 1 byte

    Axes Enable       : 1 bit x 2
    Direction Enable  : 1 bit
    Padding           : 5 bits

    Direction         : 1 byte x 2
    Start Delay       : 2 bytes

    The report size = 16 bytes
    It matches to the size of the packet on the sniffer log.

    01 06 08 FF FF 00 00 01 00 FF FF 04 00 00 00 00

    When your device receives this Set_Effect_Report (report ID = 0x01), your device copies 14 bytes of this reports, except for the first two bytes (report_ID and Effect_Block_Index fields), to the Effect array on the RAM pool. The array index is given by the Effect_Block_Index field (0x06), starting from 0x00. That is, the starting byte offset is 14 * 0x06 from the start of the RAM pool.

    I've read the table 3 too and I don't really understand how it works too

    Set_Effect_Report gives the common parameters among effects. Each effect type requires its own parameters. Type_Specific_Block_Offset field(s) point such associated parameter(s). For example, Constant_Force effect takes Magnitude and Envelope parameter blocks.

    Tsuneo
    post edited by chinzei - 2013/02/11 19:57:33
    #4
    chinzei
    Super Member
    • Total Posts : 2250
    • Reward points : 0
    • Joined: 2003/11/07 12:39:02
    • Location: Tokyo, Japan
    • Status: offline
    Re:USB PID managed POOl 2013/02/11 21:03:10 (permalink)
    0
    A problem of your Set_Effect_Report definition on the report descriptor is, it lacks Type_Specific_Block_Offset fields.

    5.1 Effect Block Parameters (p8, pid1_01.pdf)
    The minimal Effect parameter block must contain (Effect) Parameter Block Index, Effect Type, Duration, Sample Period, Gain, Trigger Button, Trigger Repeat Interval, Axis Direction, and Type Specific Block Handle values.


    If your device has just two axes, two Type_Specific_Block_Offset fields are appended to the Set_Effect_Report.

    USAGE_PAGE (Physical Interface)    05 0F
    USAGE (Type Specific Block Offset) 09 58
    COLLECTION (Logical) A1 02
      USAGE (Ordinals:Instance 1)      0B 01 00 0A 00
      USAGE (Ordinals:Instance 2)      0B 02 00 0A 00
      LOGICAL_MAXIMUM (32765)          26 FD 7F   ; 32K RAM or ROM max.
      REPORT_SIZE (16)                 75 10
      REPORT_COUNT (2)                 95 02
      OUTPUT (Data,Var,Abs)            91 02
    END_COLLECTION


    Umm.. Sample_Period and trigger_Repeat_Interval fields are also not seen.

    To make my descriptor I use one found in this forum

    You should start with a better example mad

    The example on your post has redundancy of "Physical Minimum/Maximum". It isn't bug, but of no use.
    It suggests that the author of this example doesn't know report descriptor "grammar" so much.

    Tsuneo
    #5
    sebastien.decorme
    Super Member
    • Total Posts : 463
    • Reward points : 0
    • Joined: 2005/08/19 12:37:52
    • Location: FRANCE , Pierrelatte
    • Status: offline
    Re:USB PID managed POOl 2013/02/11 22:51:47 (permalink)
    0
    Thanks you
    But it is the only example I've found .
    And I'm not an USB god, I discover everything.
    With this example my device is recognized as an FFB device and I can receive all the effect send by the Host.
    If you can give me a better example or help me to modify this one :-)
     
    Thanks
    Edit:
    Ok let try to make a better descriptor
    For the first part analog button and hat is not a problem for everyone
    Here is a new State Report Definition (p22)
     
    // Input
        // Physical Interface
        // PID State report
        // Logical collection
        // ID: 2
        // Effect Block Index:    8bit
        // state report:        6X1bit
        // Filler:            2bit   
        0x05,0x0F,
        0x09,0x92,
        0xA1,0x02,
           0x85,0x02,

           0x09,0x22,
           0x15,0x01,
           0x25,0x28,
           0x75,0x07,
           0x95,0x01,
           0x81,0x02,

           0x09,0x94,
           0x09,0x9F,
           0x09,0xA0,
           0x09,0xA4,
           0x09,0xA5,
           0x09,0xA6,
           0x15,0x00,
           0x25,0x01,
           0x35,0x00,
           0x45,0x01,
           0x75,0x01,
           0x95,0x06,
           0x81,0x02,
           0x95,0x02,
           0x81,0x03,
        0xC0,

    Here is the PID Device Control (p23)
     
        // Output
        // Physical Interface
        // PID Device Control Report / Usage PID Device Control
        // Logical collection
        // ID: 3
        // Control report:        6X1bit

        0x09,0x95,
        0xA1,0x02,
        0x85,0x03,
        0x09,0x96,  
        0xA1,0x02,  
           0x09,0x97,
           0x09,0x98,
           0x09,0x99,
           0x09,0x9A,
           0x09,0x9B,
           0x09,0x9C,
           0x75,0x08,
           0x95,0x01,
           0x91,0x00,
        0xC0,

      Here is the Pool move report (p20)

        // Output
        // Logical collection
        // PID Device Control Report / Usage PID Device Control
        // Logical collection
        // ID: 4
        // Move:        3 X 16bit

        0x09,0x85,
        0xA1,0x02,
           0x85,0x04
           0x09,0x86,
           0x09,0x87,
           0x09,0x88,
           0x26,0xFF,0x7F,
           0x75,0x10,
           0x95,0x01,
           0x92,0x02,0x01,
        0xC0,

    post edited by sebastien.decorme - 2013/02/12 00:54:52
    #6
    sebastien.decorme
    Super Member
    • Total Posts : 463
    • Reward points : 0
    • Joined: 2005/08/19 12:37:52
    • Location: FRANCE , Pierrelatte
    • Status: offline
    Re:USB PID managed POOl 2013/02/12 02:00:32 (permalink)
    0
    Suite...
     
    Here is the Set Effect Report modified with the pid V1.0
    I dont understand what is Handle values ??????  And don't really understand how the Type Specific Block Offsets works
     
        
    // Define Effect block parameters
    // pid V1.0 p8
    //The minimal Effect parameter block must contain (Effect) Parameter Block Index, Effect Type, Duration,
    //Sample Period, Gain, Trigger Button, Trigger Repeat Interval, Axis Direction, and Type Specific Block
    //Handle values.

    //Output
    //Report ID                 5
    //Effect Block Index        1 byte
    // Parameter Block Offset   ???
    //Effect type               1 byte
    //Duration                  2 bytes
    //Sample Period             2 bytes
    //Trigger Repeat Interval   2 bytes
    //Gain                      1 byte
    //Trigger Button            1 byte
    //Axe Enable                2 bits
    //Filler                    6 bits
    //Direction X               1 byte
    //Direction Y               1 byte

        0xA1,0x02,       
            0x85,0x05
            0x09,0x21,       
            0xA1,0x02,       
    //Parameter Block Index
                0x09,0x22,   
                0x15,0x01,   
                0x25,0x7F,   
                0x75,0x08,   
                0x95,0x01,   
                0x91,0x02,  
    // Parameter Block Offset
                ???
    //Effect Type
                0x09,0x25,   
                0xA1,0x02,   
                    0x09,0x26,
                    0x09,0x27,
                    0x09,0x30,
                    0x09,0x31,
                    0x09,0x32,
                    0x09,0x33,
                    0x09,0x34,
                    0x09,0x40,
                    0x09,0x41,
                    0x09,0x42,
                    0x09,0x43,
                    0x09,0x28,
                    0x25,0x0C,
                    0x15,0x01,
                    0x35,0x01,
                    0x45,0x0C,
                    0x75,0x08,
                    0x95,0x01,
                    0x91,0x00,
                0xC0,
    //Duration
    //Sample Period
    //Trigger Repeat Interval
    //Don't use the Start delay (p10)
                0x09,0x50,
                0x09,0x54,
                0x09,0x51,
                0x15,0x00,
                0x26,0xFF,0x7F,
                0x35,0x00,
                0x46,0xFF,0x7F,
                0x66,0x03,0x10,
                0x55,0xFD,
                0x75,0x10,
                0x95,0x03,
                0x91,0x02,
                0x55,0x00,
                0x66,0x00,0x00,
    //Gain
    // Resolution = 255/10000 = 0.0255
                0x09,0x52,
                0x15,0x00,
                0x26,0xFF,0x00,
                0x35,0x00,
                0x46,0x10,0x27,
                0x75,0x08,
                0x95,0x01,
                0x91,0x02,
    //Trigger Button
                0x09,0x53,
                0x15,0x01,
                0x25,0x08,
                0x35,0x01,
                0x45,0x08,
                0x75,0x08,
                0x95,0x01,
                0x91,0x02,
    //Axe Enable
                0x09,0x55,e
                0xA1,0x02,
                    0x05,0x01,
                    0x09,0x30,
                    0x09,0x31,
                    0x15,0x00,
                    0x25,0x01,
                    0x75,0x01,
                    0x95,0x02,
                    0x91,0x02,
                0xC0,
                0x95,0x06,
                0x91,0x03,
    //Don't use Direction Enable
    // Direction Enable
                /*
                0x05,0x0F,
                0x09,0x56,
                0x95,0x01,
                0x91,0x02,
                0x95,0x05,
                0x91,0x03,
                */
    //Direction
                0x09,0x57,
                0xA1,0x02,
                    0x0B,0x01,0x00,0x0A,0x00,
                    0x0B,0x02,0x00,0x0A,0x00,
                    0x66,0x14,0x00,
                    0x55,0xFE,
                    0x15,0x00,
                    0x26,0xFF,0x00,
                    0x35,0x00,
                    0x47,0xA0,0x8C,0x00,0x00,
                    0x66,0x00,0x00,
                    0x75,0x08,
                    0x95,0x02,
                    0x91,0x02,
                    0x55,0x00,
                    0x66,0x00,0x00,
                0xC0,
            0xC0,
        0xC0,

     
     
    Here is the Envelope Block parameter
     
    // Output
    // Set Envelope Report
    // Report ID     6
    // Block index      1 byte
    // Attack Level     1 byte
    // Fade Level       1 byte
    // Attack Time      2 bytes
    // Fade Time        2 bytes

    // pid V1.0 p11
    // The minimal Envelope parameter block must contain (Envelope) Parameter Block Index,
    // Attack Level, Attack Time, Fade Level and Fade Time values.

        0x09,0x5A,   
        0xA1,0x02,   
           0x85,0x06

    //Parameter Block Index
           0x09,0x22,   
           0x15,0x01,   
           0x25,0x7F,   
           0x75,0x08,   
           0x95,0x01,   
           0x91,0x02,   

    // Attack Level
    // Fade Level
           0x09,0x5B,      
           0x09,0x5D,      
           0x15,0x00,      
           0x26,0xFF,0x00, 
           0x35,0x00,      
           0x46,0x10,0x27, 
           0x75,0x08,      
           0x95,0x02,      
           0x91,0x02,     

    // Attack Time
    // Fade Time
           0x09,0x5C,     
           0x09,0x5E,     
           0x66,0x03,0x10,
           0x55,0xFD,     
           0x26,0xFF,0x7F,
           0x46,0xFF,0x7F,
           0x75,0x10,     
           0x91,0x02,     
        0xC0,

    post edited by sebastien.decorme - 2013/02/12 02:42:52
    #7
    sebastien.decorme
    Super Member
    • Total Posts : 463
    • Reward points : 0
    • Joined: 2005/08/19 12:37:52
    • Location: FRANCE , Pierrelatte
    • Status: offline
    Re:USB PID managed POOl 2013/02/12 03:14:32 (permalink)
    0
     
    Suite...
    Here is the Set condition report
        
    // Output
    // Set Condition Report
    // Report ID 7
    // Block Index       1 byte
    // CP Offset
    // Positive Coefficient    1 byte
    // Negative Coefficient    1 byte
    // Positive Saturation     1 byte
    // Negative Saturation     1 byte
    // Dead Band               1 byte

    // pid V1.0 p12
    // The minimal Condition parameter block must contain (Condition) Parameter Block Index, Center Point
    // Offset, Positive Coefficient, Negative Coefficient, Positive Saturation, Negative Saturation and Dead Band
    // values
        0x09,0x5F,  
        0xA1,0x02,  
           0x85,0x07,
    //Parameter Block Index
           0x09,0x22,     
           0x15,0x01,     
           0x25,0x7F,     
           0x75,0x08,     
           0x95,0x01,     
           0x91,0x02,     

           0x15,0x00,      
           0x25,0xFF,      
           //0x36,0x00,0x00,
           //0x46,0x10,0x27,
           0x09,0x60,    
           0x09,0x61,    
           0x09,0x62,    
           0x09,0x63,    
           0x09,0x64,    
           0x09,0x65,    
           0x75,0x08,    
           0x95,0x02,    
           0x91,0x02,    
        0xC0,

     
    Here is the periodic report
       
    // Output
    // Set Periodic Report
    // Report ID          8
    // Bloc Index       1 byte
    // Offset           1 byte
    // Magnitude        1 byte
    // Phase            1 byte
    // Period           2 bytes
    // pg15 PID 1.0
    // The minimal Periodicparameter block must contain (Periodic) Parameter Block Index, Magnitude, Offset,
    // Phase and Period values
        0x09,0x6E, 
        0xA1,0x02,   
           0x85,0x08,
    //Parameter Block Index
           0x09,0x22,      
           0x15,0x01,      
           0x25,0x7F,      
           0x75,0x08,      
           0x95,0x01,      
           0x91,0x02,      


           0x09,0x6F,              
           0x09,0x70,              
           0x15,0x00,              
           0x26,0xFF,0x00,         
           0x35,0x00,              
           0x46,0x10,0x27,         
           0x75,0x08,              
           0x95,0x01,              
           0x91,0x02,              

           0x09,0x71,              
           0x66,0x14,0x00,         
           0x55,0xFE,              
           0x15,0x00,              
           0x26,0xFF,0x00,         
           0x35,0x00,              
           0x47,0xA0,0x8C,0x00,0x00,
           0x91,0x02,             

           0x09,0x72,             
           0x26,0xFF,0x7F,        
           0x46,0xFF,0x7F,        
           0x66,0x03,0x10,        
           0x55,0xFD,             
           0x75,0x10,             
           0x95,0x01,             
           0x91,0x02,             
        0xC0,  

     
    Here is the Constant & Ramp Force Report
      
    // Output
    // Constant Force Report
    // Report ID 9
    // Block index    1 byte
    // Magnitude      2 byte
    // PID V1.0 p15
    //The minimal Ramp Force parameter block must contain (Constant Force) Parameter Block Index and Magnitude values
        0x09,0x73, 
        0xA1,0x02, 
           0x85,0x09,
    //Parameter Block Index
           0x09,0x22,    
           0x15,0x01,    
           0x25,0x7F,    
           0x75,0x08,    
           0x95,0x01,    
           0x91,0x02,    

           0x09,0x70,    
           0x16,0x01,0xFF,
           0x26,0xFF,0x00,
           0x36,0xF0,0xD8,
           0x46,0x10,0x27,
                         
           0x75,0x10,    
           0x95,0x01,    
           0x91,0x02,    
        0xC0,

    // Output
    // Ramp Force Report
    // Report ID 10
    // Block index    1 byte
    // Ramp Start     1 byte
    // Ramp End       1 byte
    // PID V1.0 p15
    //The minimal Ramp Force parameter blockmust contain (Ramp Force) Parameter Block Index, Ramp
    //Start and Ramp End values.
        0x09,0x74,   
        0xA1,0x02,   
           0x85,0x0A,
    //Parameter Block Index
           0x09,0x22,      
           0x15,0x01,      
           0x25,0x7F,      
           0x75,0x08,      
           0x95,0x01,      
           0x91,0x02,      

           0x09,0x75,      
           0x09,0x76,      
           0x15,0x80,      
           0x25,0x7F,      
           0x36,0xF0,0xD8, 
           0x46,0x10,0x27, 
                           
           0x75,0x08,      
           0x95,0x02,      
           0x91,0x02,      
        0xC0,

     
    Here is the Effect operation Report
     
    // Output
    // Effect Operation Report
    // Report ID 11
    // Block index      1 byte
    // Effect Operation 1 byte
    // Loop Count       1 byte
    // PID V1.0 p16

       0x09,0x77,  
       0xA1,0x02,  
            0x85,0x0B
    //Parameter Block Index
           0x09,0x22,       //    Usage Effect Block Index determines the location in the Effect Parameter Block
           0x15,0x01,       //    Logical Minimum 1
           0x25,0x7F,       //    Logical Maximum 7Fh (127d)
           0x75,0x08,     
           0x95,0x01,     
           0x91,0x02,     

           0x09,0x78,   
           0xA1,0x02,   
              0x09,0x79, 
              0x09,0x7A, 
              0x09,0x7B, 
              0x15,0x01, 
              0x25,0x03, 
              0x75,0x08, 
              0x95,0x01, 
              0x91,0x00, 
           0xC0,    

           0x09,0x7C,    
           0x15,0x00,    
           0x26,0xFF,0x00,
           0x91,0x02,    
        0xC0,  

    Here is the Gain Report

    // Output
    // Device Gain Report
    // Report ID 12
    // Device Gain      1 byte
    // PID V1.0 p16
        0x09,0x7D, 
        0xA1,0x02, 
           0x85,0x0C,
           0x09,0x7E,     
           0x15,0x00,     
           0x26,0xFF,0x00,
           0x35,0x00,     
           0x46,0x10,0x27,
           0x75,0x08,     
           0x95,0x01,     
           0x91,0x02,     
        0xC0     ,     

    post edited by sebastien.decorme - 2013/02/12 03:57:03
    #8
    sebastien.decorme
    Super Member
    • Total Posts : 463
    • Reward points : 0
    • Joined: 2005/08/19 12:37:52
    • Location: FRANCE , Pierrelatte
    • Status: offline
    Re:USB PID managed POOl 2013/02/12 08:34:00 (permalink)
    0
    Here is the block load report
     
    // Feature
    // Block Load Report
    // Report ID 1
    // Block Index          1 byte
    // Block Load Success   1 bit -
    // Block Load Full      1 bit  |
    // Block Load Error     1 bit  | 1 byte
    // Block Handle         1 bit -
    // RAM POOL Available   2 byte
    // PID V1.0 p41

        0x09,0x89,   
        0xA1,0x02,   
            0x85,0x01,   
            0x09,0x22,   
            0x25,0x28,   
            0x15,0x01,   
            0x35,0x01,   
            0x45,0x28,   
            0x75,0x08,   
            0x95,0x01,   
            0xB1,0x02,   

            0x09,0x8B,   
            0xA1,0x02,   
                0x09,0x8C,  
                0x09,0x8D,  
                0x09,0x8E,  
                0x09,0x8F,  
                0x25,0x03,  
                0x15,0x01,  
                0x35,0x01,  
                0x45,0x03,  
                0x75,0x08,  
                0x95,0x01,  
                0xB1,0x00,  
            0xC0     ,      

            0x09,0xAC,              
            0x15,0x00,               
            0x27,0xFF,0xFF,0x00,0x00,
            0x35,0x00,               
            0x47,0xFF,0xFF,0x00,0x00,
            0x75,0x10,               
            0x95,0x01,               
            0xB1,0x00,               
        0xC0,

     
    The problem start here with the RAM Pool
    Here is the PID Pool Report
    The Pool size is wrong because I don't understand actually how to calculate it

    // Feature
    // Report ID 2
    // RAM Pool Size            2 bytes
    // Simultaneous effect      1 byte
    // Device Managed Pool      1 bit
    // Shared Parameter Blocks  1 bit
    // filler                   6 bits
    //PID V1.0 p20
        0x09,0x7F,   
        0xA1,0x02,   
            0x85,0x02,                
            0x09,0x80,                
            0x75,0x10,                
            0x95,0x01,                
            0x15,0x00,                
            0x35,0x00,                
            0x27,0xFF,0xFF,0x00,0x00, 
            0x47,0xFF,0xFF,0x00,0x00, 
            0xB1,0x02,                

            0x09,0x83,                
            0x26,0xFF,0x00,           
            0x46,0xFF,0x00,           
            0x75,0x08,                
            0x95,0x01,                
            0xB1,0x02,                 

    // Pool alignement unused
    // Parameter Block size unused


            0x09,0xA9,           
            0x09,0xAA,           
            0x75,0x01,           
            0x95,0x02,           
            0x15,0x00,           
            0x25,0x01,            
            0x35,0x00,            
            0x45,0x01,         
            0xB1,0x02,         
            0x75,0x06,         
            0x95,0x01,         
            0xB1,0x03,         
        0xC0,

    post edited by sebastien.decorme - 2013/02/12 08:54:44
    #9
    sebastien.decorme
    Super Member
    • Total Posts : 463
    • Reward points : 0
    • Joined: 2005/08/19 12:37:52
    • Location: FRANCE , Pierrelatte
    • Status: offline
    Re:USB PID managed POOl 2013/02/12 13:48:27 (permalink)
    0
    Here is the download force sample

    // Output
    // Report ID 13
    // Download Force Sample 1 byte
    //PID V1.0 p14
    0x09,0x66,    //    Usage Download Force Sample
        0xA1,0x02,    //    Collection Datalink
           0x85,HID_OUT_Download_Force_Sample,         //    Report ID 8
           0x05,0x01,         //    Usage Page Generic Desktop
           0x09,0x30,         //    Usage X
           0x09,0x31,         //    Usage Y
           0x15,0x81,         //    Logical Minimum 81h (-127d)
           0x25,0x7F,         //    Logical Maximum 7Fh (127d)
           0x35,0x00,         //    Physical Minimum 0
           0x46,0xFF,0x00,    //    Physical Maximum FFh (255d)
           0x75,0x08,         //    Report Size 8
           0x95,0x02,         //    Report Count 2
           0x91,0x02,         //    Output (Variable)
        0xC0     ,   //    End Collection
        0x05,0x0F,   //    Usage Page Physical Interface

    #10
    chinzei
    Super Member
    • Total Posts : 2250
    • Reward points : 0
    • Joined: 2003/11/07 12:39:02
    • Location: Tokyo, Japan
    • Status: offline
    Re:USB PID managed POOl 2013/02/12 14:03:07 (permalink)
    0
    Here is a report descriptor, taken from "6. PID Example" of Physical Interface Devices (PID) spec.
    - Fixed bugs on PID Device Control Output Report
    - Deleted unnecessary items, like Physical_MIN/MAX
    - Checked on HID Descriptor Tool


    char ReportDescriptor[840] = {
        0x05, 0x01,                    // USAGE_PAGE (Generic Desktop)
        0x09, 0x04,                    // USAGE (Joystick)
        0xa1, 0x01,                    // COLLECTION (Application)

        0x85, 0x01,                    //   REPORT_ID (1)

                                    // Joystick input definition
                                    //   Throttle
        0x05, 0x02,                    //   USAGE_PAGE (Simulation Controls)
        0x09, 0xbb,                    //   USAGE (Throttle)
        0x15, 0x81,                    //   LOGICAL_MINIMUM (-127)
        0x25, 0x7f,                    //   LOGICAL_MAXIMUM (127)
        0x75, 0x08,                    //   REPORT_SIZE (8)
        0x95, 0x01,                    //   REPORT_COUNT (1)
        0x81, 0x02,                    //   INPUT (Data,Var,Abs)
                                    //   Axes
        0x05, 0x01,                    //   USAGE_PAGE (Generic Desktop)
        0x09, 0x01,                    //   USAGE (Pointer)
        0xa1, 0x00,                    //   COLLECTION (Physical)
        0x09, 0x30,                    //     USAGE (X)
        0x09, 0x31,                    //     USAGE (Y)
        0x95, 0x02,                    //     REPORT_COUNT (2)
        0x81, 0x02,                    //     INPUT (Data,Var,Abs)
        0xc0,                          //   END_COLLECTION
                                    //   Hat switch
        0x09, 0x39,                    //   USAGE (Hat switch)
        0x15, 0x00,                    //   LOGICAL_MINIMUM (0)
        0x25, 0x03,                    //   LOGICAL_MAXIMUM (3)
        0x35, 0x00,                    //   PHYSICAL_MINIMUM (0)
        0x46, 0x0e, 0x01,              //   PHYSICAL_MAXIMUM (270)
        0x65, 0x14,                    //   UNIT (Eng Rot:Angular Pos)
        0x75, 0x04,                    //   REPORT_SIZE (4)
        0x95, 0x01,                    //   REPORT_COUNT (1)
        0x81, 0x02,                    //   INPUT (Data,Var,Abs)
        0x45, 0x00,                    //   PHYSICAL_MAXIMUM (0)
        0x65, 0x00,                    //   UNIT (None)
                                    //   Buttons
        0x05, 0x09,                    //   USAGE_PAGE (Button)
        0x19, 0x01,                    //   USAGE_MINIMUM (Button 1)
        0x29, 0x04,                    //   USAGE_MAXIMUM (Button 4)
        0x25, 0x01,                    //   LOGICAL_MAXIMUM (1)
        0x95, 0x04,                    //   REPORT_COUNT (4)
        0x75, 0x01,                    //   REPORT_SIZE (1)
        0x81, 0x02,                    //   INPUT (Data,Var,Abs)

                                    // Force Feedback commands
        0x05, 0x0f,                    //   USAGE_PAGE (Physical Interface)

                                    //    Effect Report
        0x09, 0x21,                    //   USAGE (Set Effect Report)
        0xa1, 0x02,                    //   COLLECTION (Logical)
        0x09, 0x22,                    //     USAGE (Effect Block Index)
        0x25, 0x7f,                    //     LOGICAL_MAXIMUM (127)
        0x75, 0x07,                    //     REPORT_SIZE (7)
        0x95, 0x01,                    //     REPORT_COUNT (1)
        0x91, 0x02,                    //     OUTPUT (Data,Var,Abs)
       
        0x09, 0x24,                    //     USAGE (ROM Flag)
        0x25, 0x01,                    //     LOGICAL_MAXIMUM (1)
        0x75, 0x01,                    //     REPORT_SIZE (1)
        0x91, 0x02,                    //     OUTPUT (Data,Var,Abs)
       
                                    //      available effect types
        0x09, 0x25,                    //     USAGE (Effect Type)
        0xa1, 0x02,                    //     COLLECTION (Logical)
        0x09, 0x26,                    //       USAGE (ET Constant Force)
        0x09, 0x27,                    //       USAGE (ET Ramp)
        0x09, 0x30,                    //       USAGE (ET Square)
        0x09, 0x31,                    //       USAGE (ET Sine)
        0x09, 0x32,                    //       USAGE (ET Triangle)
        0x09, 0x33,                    //       USAGE (ET Sawtooth Up)
        0x09, 0x34,                    //       USAGE (ET Sawtooth Down)
        0x09, 0x40,                    //       USAGE (ET Spring)
        0x09, 0x41,                    //       USAGE (ET Damper)
        0x09, 0x42,                    //       USAGE (ET Inertia)
        0x15, 0x01,                    //       LOGICAL_MINIMUM (1)
        0x25, 0x0a,                    //       LOGICAL_MAXIMUM (10)
        0x75, 0x08,                    //       REPORT_SIZE (8)
        0x91, 0x00,                    //       OUTPUT (Data,Ary,Abs)
        0xc0,                          //     END_COLLECTION
       
        0x09, 0x50,                    //     USAGE (Duration)
        0x09, 0x54,                    //     USAGE (Trigger Repeat Interval)
        0x15, 0x00,                    //     LOGICAL_MINIMUM (0)
        0x26, 0x10, 0x27,              //     LOGICAL_MAXIMUM (10000)
        0x75, 0x10,                    //     REPORT_SIZE (16)
        0x66, 0x03, 0x10,              //     UNIT (Eng Lin:Time)
        0x55, 0x0d,                    //     UNIT_EXPONENT (-3)
        0x95, 0x02,                    //     REPORT_COUNT (2)
        0x91, 0x02,                    //     OUTPUT (Data,Var,Abs)
       
        0x55, 0x0a,                    //     UNIT_EXPONENT (-6)
        0x09, 0x51,                    //     USAGE (Sample Period)
        0x95, 0x01,                    //     REPORT_COUNT (1)
        0x91, 0x02,                    //     OUTPUT (Data,Var,Abs)
        0x55, 0x00,                    //     UNIT_EXPONENT (0)
        0x65, 0x00,                    //     UNIT (None)
       
        0x09, 0x52,                    //     USAGE (Gain)
        0x09, 0x53,                    //     USAGE (Trigger Button)
        0x25, 0x7f,                    //     LOGICAL_MAXIMUM (127)
        0x75, 0x08,                    //     REPORT_SIZE (8)
        0x95, 0x02,                    //     REPORT_COUNT (2)
        0x91, 0x02,                    //     OUTPUT (Data,Var,Abs)
       
        0x09, 0x55,                    //     USAGE (Axes Enable)
        0xa1, 0x02,                    //     COLLECTION (Logical)
        0x05, 0x01,                    //       USAGE_PAGE (Generic Desktop)
        0x09, 0x01,                    //       USAGE (Pointer)
        0xa1, 0x00,                    //       COLLECTION (Physical)
        0x09, 0x30,                    //         USAGE (X)
        0x09, 0x31,                    //         USAGE (Y)
        0x25, 0x01,                    //         LOGICAL_MAXIMUM (1)
        0x75, 0x01,                    //         REPORT_SIZE (1)
        0x95, 0x02,                    //         REPORT_COUNT (2)
        0x91, 0x02,                    //         OUTPUT (Data,Var,Abs)
        0xc0,                          //       END_COLLECTION
        0xc0,                          //     END_COLLECTION
       
        0x95, 0x06,                    //     REPORT_COUNT (6)
        0x91, 0x03,                    //     OUTPUT (Cnst,Var,Abs)
       
        0x05, 0x0f,                    //     USAGE_PAGE (Physical Interface)
        0x09, 0x57,                    //     USAGE (Direction)
        0xa1, 0x02,                    //     COLLECTION (Logical)
        0x05, 0x01,                    //       USAGE_PAGE (Generic Desktop)
        0x09, 0x01,                    //       USAGE (Pointer)
        0xa1, 0x00,                    //       COLLECTION (Physical)
        0x09, 0x30,                    //         USAGE (X)
        0x09, 0x31,                    //         USAGE (Y)
        0x15, 0x00,                    //         LOGICAL_MINIMUM (0)
        0x26, 0xff, 0x00,              //         LOGICAL_MAXIMUM (255)
        0x46, 0x68, 0x01,              //         PHYSICAL_MAXIMUM (360)
        0x65, 0x14,                    //         UNIT (Eng Rot:Angular Pos)
        0x75, 0x08,                    //         REPORT_SIZE (8)
        0x95, 0x02,                    //         REPORT_COUNT (2)
        0x91, 0x02,                    //         OUTPUT (Data,Var,Abs)
        0x65, 0x00,                    //         UNIT (None)
        0x45, 0x00,                    //         PHYSICAL_MAXIMUM (0)
        0xc0,                          //       END_COLLECTION
        0xc0,                          //     END_COLLECTION
       
        0x05, 0x0f,                    //     USAGE_PAGE (Physical Interface)
        0x09, 0x58,                    //     USAGE (Type Specific Block Offset)
        0xa1, 0x02,                    //     COLLECTION (Logical)
        0x0b, 0x01, 0x00, 0x0a, 0x00,  //       USAGE (Ordinals:Instance 1)
        0x0b, 0x02, 0x00, 0x0a, 0x00,  //       USAGE (Ordinals:Instance 2)
        0x26, 0xff, 0x7f,              //       LOGICAL_MAXIMUM (32767)
        0x75, 0x10,                    //       REPORT_SIZE (16)
        0x95, 0x02,                    //       REPORT_COUNT (2)
        0x91, 0x02,                    //       OUTPUT (Data,Var,Abs)
        0xc0,                          //     END_COLLECTION
        0xc0,                          //   END_COLLECTION
       
                                    // Envelope Report
        0x09, 0x5a,                    //   USAGE (Set Envelope Report)
        0xa1, 0x02,                    //   COLLECTION (Logical)
        0x85, 0x02,                    //     REPORT_ID (2)
        0x09, 0x23,                    //     USAGE (Parameter Block Offset)
        0x26, 0xff, 0x7f,              //     LOGICAL_MAXIMUM (32767)
        0x75, 0x0f,                    //     REPORT_SIZE (15)
        0x95, 0x01,                    //     REPORT_COUNT (1)
        0x91, 0x02,                    //     OUTPUT (Data,Var,Abs)
       
        0x09, 0x24,                    //     USAGE (ROM Flag)
        0x25, 0x01,                    //     LOGICAL_MAXIMUM (1)
        0x75, 0x01,                    //     REPORT_SIZE (1)
        0x91, 0x02,                    //     OUTPUT (Data,Var,Abs)
       
        0x09, 0x5b,                    //     USAGE (Attack Level)
        0x09, 0x5d,                    //     USAGE (Fade Level)
        0x26, 0xff, 0x00,              //     LOGICAL_MAXIMUM (255)
        0x75, 0x08,                    //     REPORT_SIZE (8)
        0x95, 0x02,                    //     REPORT_COUNT (2)
        0x91, 0x02,                    //     OUTPUT (Data,Var,Abs)
       
        0x09, 0x5c,                    //     USAGE (Attack Time)
        0x09, 0x5e,                    //     USAGE (Fade Time)
        0x26, 0x10, 0x27,              //     LOGICAL_MAXIMUM (10000)
        0x66, 0x03, 0x10,              //     UNIT (Eng Lin:Time)
        0x55, 0x0d,                    //     UNIT_EXPONENT (-3)
        0x75, 0x10,                    //     REPORT_SIZE (16)
        0x91, 0x02,                    //     OUTPUT (Data,Var,Abs)
        0x65, 0x00,                    //     UNIT (None)
        0x55, 0x00,                    //     UNIT_EXPONENT (0)
        0xc0,                          //   END_COLLECTION
       
                                    // Condition Report
        0x09, 0x5f,                    //   USAGE (Set Condition Report)
        0xa1, 0x02,                    //   COLLECTION (Logical)
        0x85, 0x03,                    //     REPORT_ID (3)
        0x09, 0x23,                    //     USAGE (Parameter Block Offset)
        0x26, 0xff, 0x7f,              //     LOGICAL_MAXIMUM (32767)
        0x75, 0x0f,                    //     REPORT_SIZE (15)
        0x95, 0x01,                    //     REPORT_COUNT (1)
        0x91, 0x02,                    //     OUTPUT (Data,Var,Abs)
       
        0x09, 0x24,                    //     USAGE (ROM Flag)
        0x25, 0x01,                    //     LOGICAL_MAXIMUM (1)
        0x75, 0x01,                    //     REPORT_SIZE (1)
        0x91, 0x02,                    //     OUTPUT (Data,Var,Abs)
       
        0x09, 0x60,                    //     USAGE (CP Offset)
        0x09, 0x61,                    //     USAGE (Positive Coefficient)
        0x09, 0x62,                    //     USAGE (Negative Coefficient)
        0x09, 0x63,                    //     USAGE (Positive Saturation)
        0x09, 0x64,                    //     USAGE (Negative Saturation)
        0x09, 0x65,                    //     USAGE (Dead Band)
        0x26, 0xff, 0x00,              //     LOGICAL_MAXIMUM (255)
        0x75, 0x08,                    //     REPORT_SIZE (8)
        0x95, 0x06,                    //     REPORT_COUNT (6)
        0x91, 0x02,                    //     OUTPUT (Data,Var,Abs)
        0xc0,                          //   END_COLLECTION
       
                                    // Periodic Report
        0x09, 0x6e,                    //   USAGE (Set Periodic Report)
        0xa1, 0x02,                    //   COLLECTION (Logical)
        0x85, 0x04,                    //     REPORT_ID (4)
        0x09, 0x23,                    //     USAGE (Parameter Block Offset)
        0x26, 0xff, 0x7f,              //     LOGICAL_MAXIMUM (32767)
        0x75, 0x0f,                    //     REPORT_SIZE (15)
        0x95, 0x01,                    //     REPORT_COUNT (1)
        0x91, 0x02,                    //     OUTPUT (Data,Var,Abs)
       
        0x09, 0x24,                    //     USAGE (ROM Flag)
        0x25, 0x01,                    //     LOGICAL_MAXIMUM (1)
        0x75, 0x01,                    //     REPORT_SIZE (1)
        0x91, 0x02,                    //     OUTPUT (Data,Var,Abs)
       
        0x09, 0x70,                    //     USAGE (Magnitude)
        0x09, 0x6f,                    //     USAGE (Offset)
        0x09, 0x71,                    //     USAGE (Phase)
        0x26, 0xff, 0x00,              //     LOGICAL_MAXIMUM (255)
        0x75, 0x08,                    //     REPORT_SIZE (8)
        0x95, 0x03,                    //     REPORT_COUNT (3)
        0x91, 0x02,                    //     OUTPUT (Data,Var,Abs)
       
        0x09, 0x72,                    //     USAGE (Period)
        0x26, 0x10, 0x27,              //     LOGICAL_MAXIMUM (10000)
        0x66, 0x03, 0x10,              //     UNIT (Eng Lin:Time)
        0x55, 0x0d,                    //     UNIT_EXPONENT (-3)
        0x75, 0x10,                    //     REPORT_SIZE (16)
        0x95, 0x01,                    //     REPORT_COUNT (1)
        0x91, 0x02,                    //     OUTPUT (Data,Var,Abs)
        0x65, 0x00,                    //     UNIT (None)
        0x55, 0x00,                    //     UNIT_EXPONENT (0)
        0xc0,                          //   END_COLLECTION
       
                                    // Constant Force Report
        0x09, 0x73,                    //   USAGE (Set Constant Force Report)
        0xa1, 0x02,                    //   COLLECTION (Logical)
        0x85, 0x05,                    //     REPORT_ID (5)
        0x09, 0x23,                    //     USAGE (Parameter Block Offset)
        0x26, 0xff, 0x7f,              //     LOGICAL_MAXIMUM (32767)
        0x75, 0x0f,                    //     REPORT_SIZE (15)
        0x95, 0x01,                    //     REPORT_COUNT (1)
        0x91, 0x02,                    //     OUTPUT (Data,Var,Abs)
       
        0x09, 0x24,                    //     USAGE (ROM Flag)
        0x25, 0x01,                    //     LOGICAL_MAXIMUM (1)
        0x75, 0x01,                    //     REPORT_SIZE (1)
        0x91, 0x02,                    //     OUTPUT (Data,Var,Abs)
       
        0x09, 0x70,                    //     USAGE (Magnitude)
        0x26, 0xff, 0x00,              //     LOGICAL_MAXIMUM (255)
        0x75, 0x08,                    //     REPORT_SIZE (8)
        0x91, 0x02,                    //     OUTPUT (Data,Var,Abs)
        0xc0,                          //   END_COLLECTION
       
                                    // Ramp Force Report
        0x09, 0x74,                    //   USAGE (Set Ramp Force Report)
        0xa1, 0x02,                    //   COLLECTION (Logical)
        0x85, 0x06,                    //     REPORT_ID (6)
        0x09, 0x23,                    //     USAGE (Parameter Block Offset)
        0x26, 0xff, 0x7f,              //     LOGICAL_MAXIMUM (32767)
        0x75, 0x0f,                    //     REPORT_SIZE (15)
        0x95, 0x01,                    //     REPORT_COUNT (1)
        0x91, 0x02,                    //     OUTPUT (Data,Var,Abs)
       
        0x09, 0x24,                    //     USAGE (ROM Flag)
        0x25, 0x01,                    //     LOGICAL_MAXIMUM (1)
        0x75, 0x01,                    //     REPORT_SIZE (1)
        0x91, 0x02,                    //     OUTPUT (Data,Var,Abs)
       
        0x09, 0x75,                    //     USAGE (Ramp Start)
        0x09, 0x76,                    //     USAGE (Ramp End)
        0x26, 0xff, 0x00,              //     LOGICAL_MAXIMUM (255)
        0x75, 0x08,                    //     REPORT_SIZE (8)
        0x95, 0x02,                    //     REPORT_COUNT (2)
        0x91, 0x02,                    //     OUTPUT (Data,Var,Abs)
        0xc0,                          //   END_COLLECTION
       
                                    // Custom Force Data Report
        0x09, 0x68,                    //   USAGE (Custom Force Data Report)
        0xa1, 0x02,                    //   COLLECTION (Logical)
        0x85, 0x07,                    //     REPORT_ID (7)
        0x09, 0x23,                    //     USAGE (Parameter Block Offset)
        0x26, 0xff, 0x7f,              //     LOGICAL_MAXIMUM (32767)
        0x75, 0x0f,                    //     REPORT_SIZE (15)
        0x95, 0x01,                    //     REPORT_COUNT (1)
        0x91, 0x02,                    //     OUTPUT (Data,Var,Abs)
       
        0x0b, 0x3b, 0x00, 0x01, 0x00,  //     USAGE (Generic Desktop:Byte Count)
        0x26, 0x00, 0x01,              //     LOGICAL_MAXIMUM (256)
        0x75, 0x09,                    //     REPORT_SIZE (9)
        0x91, 0x02,                    //     OUTPUT (Data,Var,Abs)
       
        0x09, 0x69,                    //     USAGE (Custom Force Data)
        0x26, 0xff, 0x00,              //     LOGICAL_MAXIMUM (255)
        0x75, 0x08,                    //     REPORT_SIZE (8)
        0x96, 0x00, 0x01,              //     REPORT_COUNT (256)
        0x92, 0x02, 0x01,              //     OUTPUT (Data,Var,Abs,Buf)
        0xc0,                          //   END_COLLECTION
       
                                    // Download Force Sample
        0x09, 0x66,                    //   USAGE (Download Force Sample)
        0xa1, 0x02,                    //   COLLECTION (Logical)
        0x85, 0x08,                    //     REPORT_ID (8)
        0x05, 0x01,                    //     USAGE_PAGE (Generic Desktop)
        0x09, 0x01,                    //     USAGE (Pointer)
        0xa1, 0x00,                    //     COLLECTION (Physical)
        0x09, 0x30,                    //       USAGE (X)
        0x09, 0x31,                    //       USAGE (Y)
        0x15, 0x81,                    //       LOGICAL_MINIMUM (-127)
        0x25, 0x7f,                    //       LOGICAL_MAXIMUM (127)
        0x75, 0x08,                    //       REPORT_SIZE (8)
        0x95, 0x02,                    //       REPORT_COUNT (2)
        0x91, 0x02,                    //       OUTPUT (Data,Var,Abs)
        0xc0,                          //     END_COLLECTION
        0xc0,                          //   END_COLLECTION
       
                                    // Custom Force Report
        0x05, 0x0f,                    //   USAGE_PAGE (Physical Interface)
        0x09, 0x6b,                    //   USAGE (Set Custom Force Report)
        0xa1, 0x02,                    //   COLLECTION (Logical)
        0x85, 0x09,                    //     REPORT_ID (9)
        0x09, 0x23,                    //     USAGE (Parameter Block Offset)
        0x09, 0x6c,                    //     USAGE (Custom Force Data Offset)
        0x09, 0x6d,                    //     USAGE (Sample Count)
        0x15, 0x00,                    //     LOGICAL_MINIMUM (0)
        0x26, 0xff, 0x7f,              //     LOGICAL_MAXIMUM (32767)
        0x95, 0x03,                    //     REPORT_COUNT (3)
        0x75, 0x10,                    //     REPORT_SIZE (16)
        0x91, 0x02,                    //     OUTPUT (Data,Var,Abs)
        0xc0,                          //   END_COLLECTION
       
                                    // Effect Operation Report
        0x09, 0x77,                    //   USAGE (Effect Operation Report)
        0xa1, 0x02,                    //   COLLECTION (Logical)
        0x85, 0x0a,                    //     REPORT_ID (10)
        0x09, 0x22,                    //     USAGE (Effect Block Index)
        0x25, 0x7f,                    //     LOGICAL_MAXIMUM (127)
        0x75, 0x07,                    //     REPORT_SIZE (7)
        0x95, 0x01,                    //     REPORT_COUNT (1)
        0x91, 0x02,                    //     OUTPUT (Data,Var,Abs)
       
        0x09, 0x24,                    //     USAGE (ROM Flag)
        0x25, 0x01,                    //     LOGICAL_MAXIMUM (1)
        0x75, 0x01,                    //     REPORT_SIZE (1)
        0x91, 0x02,                    //     OUTPUT (Data,Var,Abs)
       
        0x09, 0x78,                    //     USAGE (Effect Operation)
        0xa1, 0x02,                    //     COLLECTION (Logical)
        0x09, 0x79,                    //       USAGE (Op Effect Start)
        0x09, 0x7a,                    //       USAGE (Op Effect Start Solo)
        0x09, 0x7b,                    //       USAGE (Op Effect Stop)
        0x15, 0x01,                    //       LOGICAL_MINIMUM (1)
        0x25, 0x03,                    //       LOGICAL_MAXIMUM (3)
        0x75, 0x08,                    //       REPORT_SIZE (8)
        0x91, 0x00,                    //       OUTPUT (Data,Ary,Abs)
        0xc0,                          //     END_COLLECTION
       
        0x09, 0x7c,                    //     USAGE (Loop Count)
        0x15, 0x00,                    //     LOGICAL_MINIMUM (0)
        0x26, 0xff, 0x00,              //     LOGICAL_MAXIMUM (255)
        0x91, 0x02,                    //     OUTPUT (Data,Var,Abs)
        0xc0,                          //   END_COLLECTION
       
                                    // PID Pool Report
        0x09, 0x7f,                    //   USAGE (PID Pool Report)
        0xa1, 0x02,                    //   COLLECTION (Logical)
        0x85, 0x01,                    //     REPORT_ID (1)
        0x09, 0x80,                    //     USAGE (RAM Pool Size)
        0x09, 0x81,                    //     USAGE (ROM Pool Size)
        0x09, 0x82,                    //     USAGE (ROM Effect Block Count)
        0x26, 0xff, 0x7f,              //     LOGICAL_MAXIMUM (32767)
        0x95, 0x03,                    //     REPORT_COUNT (3)
        0x75, 0x10,                    //     REPORT_SIZE (16)
        0xb1, 0x02,                    //     FEATURE (Data,Var,Abs)
       
        0x09, 0xa8,                    //     USAGE (Parameter Block Size)
        0xa1, 0x02,                    //     COLLECTION (Logical)
        0x09, 0x21,                    //       USAGE (Set Effect Report)
        0x09, 0x5a,                    //       USAGE (Set Envelope Report)
        0x09, 0x5f,                    //       USAGE (Set Condition Report)
        0x09, 0x6e,                    //       USAGE (Set Periodic Report)
        0x09, 0x73,                    //       USAGE (Set Constant Force Report)
        0x09, 0x74,                    //       USAGE (Set Ramp Force Report)
        0x09, 0x6b,                    //       USAGE (Set Custom Force Report)
        0x26, 0xff, 0x00,              //       LOGICAL_MAXIMUM (255)
        0x75, 0x08,                    //       REPORT_SIZE (8)
        0x95, 0x07,                    //       REPORT_COUNT (7)
        0xb1, 0x02,                    //       FEATURE (Data,Var,Abs)
        0xc0,                          //     END_COLLECTION
       
        0x25, 0x01,                    //     LOGICAL_MAXIMUM (1)
        0x75, 0x07,                    //     REPORT_SIZE (7)
        0x95, 0x01,                    //     REPORT_COUNT (1)
        0xb1, 0x03,                    //     FEATURE (Cnst,Var,Abs)
       
        0x09, 0x67,                    //     USAGE (Isoch Custom Force Enable)
        0x75, 0x01,                    //     REPORT_SIZE (1)
        0xb1, 0x02,                    //     FEATURE (Data,Var,Abs)
        0xc0,                          //   END_COLLECTION
       
                                    // PID State Report
        0x09, 0x92,                    //   USAGE (PID State Report)
        0xa1, 0x02,                    //   COLLECTION (Logical)
        0x85, 0x02,                    //     REPORT_ID (2)
        0x09, 0x22,                    //     USAGE (Effect Block Index)
        0x25, 0x7f,                    //     LOGICAL_MAXIMUM (127)
        0x95, 0x01,                    //     REPORT_COUNT (1)
        0x75, 0x07,                    //     REPORT_SIZE (7)
        0x81, 0x02,                    //     INPUT (Data,Var,Abs)
       
        0x09, 0x24,                    //     USAGE (ROM Flag)
        0x25, 0x01,                    //     LOGICAL_MAXIMUM (1)
        0x75, 0x01,                    //     REPORT_SIZE (1)
        0x81, 0x02,                    //     INPUT (Data,Var,Abs)
       
        0x09, 0x94,                    //     USAGE (Effect Playing)
        0x09, 0xa0,                    //     USAGE (Actuators Enabled)
        0x09, 0xa4,                    //     USAGE (Safety Switch)
        0x09, 0xa6,                    //     USAGE (Actuator Power)
        0x95, 0x04,                    //     REPORT_COUNT (4)
        0x81, 0x02,                    //     INPUT (Data,Var,Abs)
        0x81, 0x03,                    //     INPUT (Cnst,Var,Abs)
        0xc0,                          //   END_COLLECTION
       
                                    // PID Device Control Report
        0x09, 0x95,                    //   USAGE (PID Device Control Report)
        0xa1, 0x02,                    //   COLLECTION (Logical)
        0x85, 0x0b,                    //     REPORT_ID (11)
        0x09, 0x96,                    //     USAGE (PID Device Control)
        0xa1, 0x02,                    //     COLLECTION (Logical)
        0x09, 0x97,                    //       USAGE (DC Enable Actuators)
        0x09, 0x98,                    //       USAGE (DC Disable Actuators)
        0x09, 0x99,                    //       USAGE (DC Stop All Effects)
        0x09, 0x9a,                    //       USAGE (DC Device Reset)
        0x09, 0x9b,                    //       USAGE (DC Device Pause)
        0x09, 0x9c,                    //       USAGE (DC Device Continue)
        0x15, 0x01,                    //       LOGICAL_MINIMUM (1)
        0x25, 0x06,                    //       LOGICAL_MAXIMUM (6)
        0x75, 0x08,                    //       REPORT_SIZE (8)
        0x95, 0x01,                    //       REPORT_COUNT (1)
        0x91, 0x00,                    //       OUTPUT (Data,Ary,Abs)
        0xc0,                          //     END_COLLECTION
        0xc0,                          //   END_COLLECTION
       
                                    // PID Pool Move Report
        0x09, 0x85,                    //   USAGE (PID Pool Move Report)
        0xa1, 0x02,                    //   COLLECTION (Logical)
        0x85, 0x0c,                    //     REPORT_ID (12)
        0x09, 0x86,                    //     USAGE (Move Source)
        0x09, 0x87,                    //     USAGE (Move Destination)
        0x09, 0x88,                    //     USAGE (Move Length)
        0x15, 0x00,                    //     LOGICAL_MINIMUM (0)
        0x26, 0xff, 0x7f,              //     LOGICAL_MAXIMUM (32767)
        0x75, 0x10,                    //     REPORT_SIZE (16)
        0x95, 0x03,                    //     REPORT_COUNT (3)
        0x92, 0x02, 0x01,              //     OUTPUT (Data,Var,Abs,Buf)
        0xc0,                          //   END_COLLECTION
       
                                    // Device Gain Report
        0x09, 0x7d,                    //   USAGE (Device Gain Report)
        0xa1, 0x02,                    //   COLLECTION (Logical)
        0x85, 0x02,                    //     REPORT_ID (2)
        0x09, 0x7e,                    //     USAGE (Device Gain)
        0x26, 0xff, 0x00,              //     LOGICAL_MAXIMUM (255)
        0x75, 0x08,                    //     REPORT_SIZE (8)
        0x95, 0x01,                    //     REPORT_COUNT (1)
        0xb1, 0x02,                    //     FEATURE (Data,Var,Abs)
        0xc0,                          //   END_COLLECTION

        0xc0                           // END_COLLECTION
    };


    Tsuneo
    #11
    sebastien.decorme
    Super Member
    • Total Posts : 463
    • Reward points : 0
    • Joined: 2005/08/19 12:37:52
    • Location: FRANCE , Pierrelatte
    • Status: offline
    Re:USB PID managed POOl 2013/02/12 14:13:33 (permalink)
    0
    Thanks you
    I've quite finished mine
    I will try yours asap
    Good night (For me)
    Good day (for you)
    #12
    sebastien.decorme
    Super Member
    • Total Posts : 463
    • Reward points : 0
    • Joined: 2005/08/19 12:37:52
    • Location: FRANCE , Pierrelatte
    • Status: offline
    Re:USB PID managed POOl 2013/02/13 07:12:03 (permalink)
    0
    Here is the log with the descriptor I've a problem with Force Tester an application to test Force
    It says No force feedback joystick detected
    Chinzei_descriptor.zip
    Thanks
     
    post edited by sebastien.decorme - 2013/02/13 07:53:17
    #13
    Jump to:
    © 2019 APG vNext Commercial Version 4.5