[libhid-discuss] help deciphering HID descriptor

Peter Stuge stuge-libhid at cdy.org
Wed Nov 28 20:19:02 UTC 2007


On Wed, Nov 28, 2007 at 02:25:01PM -0500, Hans-Christoph Steiner wrote:
>      const int path[] = {0x000c0001, 0x000c0001};
>      long path_element;
>      unsigned int const depth = 2;
>      unsigned char const SEND_PACKET_LEN = 2;
>      char const PACKET[] = { 0x50 };
> 
>      if ( !hid_is_opened(x->x_hidinterface) )
>      {
>          error("[usbhid] device not open, can't set data");
>          return;
>      }
>      x->x_hid_return = hid_set_output_report(x->x_hidinterface,
>                                              path,
>                                              depth,
>                                              PACKET,
>                                              SEND_PACKET_LEN);

Dunno about the descriptor, but you seem to be trying to send two
bytes when the buffer only has one.


//Peter



More information about the libhid-discuss mailing list