[libhid-discuss] setting output problems
Hans-Christoph Steiner
hans at eds.org
Fri May 2 17:53:09 UTC 2008
Hey,
I am trying to get my code to output properly and having trouble. I
was hoping someone could show me some simple example code just to
send an output report. So here are the paths reported from libhid:
path: 0x00010005.0x00010030; type: 0x90
path: 0x00010005.0x00010031; type: 0x90
path: 0x00010005.0x00010032; type: 0x90
path: 0x00010005.0x00010033; type: 0x90
path: 0x00010005.0x00010034; type: 0x90
path: 0x00010005.0x00010035; type: 0x90
path: 0x00010005.0x00010036; type: 0x90
path: 0x00010005.0x00010037; type: 0x90
Apple USB Prober says that they each have a Report Size of 16 and
there is a report count of 8. Here's the code I tried, it doesn't
give errors, it just doesn't seem to work:
int path[] = {0x00010005, 0x00010030};
unsigned int const depth = 2; // number of 32bit chunks in the path
unsigned char const SEND_PACKET_LEN = 2; // number of bytes in packet
char const PACKET[] = { 0x00, 0x00 }; // the data to write
//char const PACKET[] = { 0xff, 0xff }; // the data to write
if ( !hid_is_opened(x->x_hidinterface) )
{
printf("[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);
.hc
------------------------------------------------------------------------
----
You can't steal a gift. Bird gave the world his music, and if you can
hear it, you can have it. - Dizzy Gillespie
More information about the libhid-discuss
mailing list