Generic HID with HCS08JM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Generic HID with HCS08JM

1,331 Views
ETCTim
Contributor I
I am trying to use the USB with Generic HID to move some data from my development board to my PC.
I successfully have the Freescale demo board running and delivering 1 byte of data based on the 2 switches on the eval board.
 
My problem is that I cannot figure out how to increase the 1 byte to multiple bytes. I tried changing a few of the values, such as the 1 in the following code:
out_report=hid_add_report(rpt_out, 0, 1);
in_report=hid_add_report(rpt_in, 0, 1);
 
As well as the constant EP0_PACKET_SIZE (which is 8 by default.)
 
Any changes I have tried have caused the board to run off into the weeds when I try to USB send.
 
I would appreciate if someone can help me out.
 
Which values should I modify?
Do I need to modify my descriptor?
 
Ultimately, I would like to send a payload of 64 bytes.
 
Thanks in advanced.
Tim
 
Labels (1)
0 Kudos
2 Replies

364 Views
Goz
Contributor I
Hi Tim,
 
You are almost there. I am assuming you are having problems sending back data larger than just a few bytes. If so, you will also have to change your endpoint descriptor in the hid_usb_config.c file.  Modify USB_FILL_EP_DEC to something like the following USB_FILL_EP_DESC(0x1, 1, 3, 64, 4). Where 64 indicates that you want to be able to send 64 bytes max back to the host.
Along with what you have changed already, this should just work.
 
Goz
0 Kudos

364 Views
TurboBob
Contributor IV
don't forget MaxReportLength in HID.c  this sets the array sizes when setting up reports.
 
 
0 Kudos