[libhid-discuss] Usage Path Question
Christopher Moore
christopher at bnmintl.com
Fri Oct 3 10:53:31 UTC 2008
Thanks Charles, I'll give it a try.
Charles Lepple wrote:
> On Oct 2, 2008, at 1:25 PM, Christopher Moore wrote:
>
>> Hey everyone,
>>
>> I have a question about usage path and formatting a
>> hid_set_output/input_report.
>>
>> Given the output below, I'm trying to:
>>
>> send a report to: Report ID #4, I believe the Path to be:
>> PATHLEN = 2
>> PATH_OUT = [0x000B0001,0x0014002C] or is it [0x0B01,0x142C]?
>> SEND_PACKET_LEN = 8
>
> (By the way, if you're using Python, it calculates the length of the
> list/tuple before passing that to the C portion of libhid. So PATHLEN
> is not needed.)
>
> It's the first one - 0x000B0001 etc.
>
> The elements of the usage path are 32-bit numbers, composed of the
> usage page in the upper 16 bits, and the usage in the lower 16 bits.
>
>> receive a report from: Report ID #3 (same as above ... which seems
>> wierd...)
>> PATHLEN = 2
>> PATH_OUT = [0x000B0001,0x0014002C] or is it [0x0B01,0x142C]?
>> RECEIVE_PACKET_LEN = 7
>>
>> Is my assumption/formatting correct?
>
> I think so.
>
> It's OK to have the same path for inputs, outputs and features. (For
> instance, with a file, you can read or write to it.)
>
> You just have to use the proper function for each item.
>
More information about the libhid-discuss
mailing list