I'm using the CCS compiler to implement a USB keyboard. I built the PIC application using information from the CCS examples. In general, things have gone well. But now I have a problem. I need the keyboard to function when the PC is booting up. I believe that to do this I need to implement the HID class for boot protocol. I've investigated the code and have enabled the macro definition USB_HID_BOOT_PROTOCOL. This is not enough to do the job - no surprise there. In order to figure out what more I need, I investigated the code entabled by the above macro. Basically it enables query and setting of a variable hid_protocol which might have a value of 0 or 1. OK. BUT, I can't find anywhere in any part of the code where this variable is referred to in anyway. Nor is there documentation on how to use it.
Any additional information would be appreciated.
Robert Ramey
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Sat Dec 04, 2010 3:06 pm
I ran a text search engine on the CCS directories for 'hid_protocol' and I
got the results shown below. Line numbers are on the left side.
This is with compiler vs. 4.114:
Code:
c:\program files\picc\drivers\usb.c
119 //// The array hid_protocol[] saves which protocol mode each ////
186 unsigned int8 hid_protocol[USB_NUM_HID_INTERFACES];
313 hid_protocol[i] = 1;
643 usb_ep0_tx_buffer[0]=hid_protocol[usb_ep0_rx_buffer[4]];
651 hid_protocol[usb_ep0_rx_buffer[4]]=usb_ep0_rx_buffer[2];
c:\program files\picc\drivers\usb.h
265 //// The array hid_protocol[] saves which protocol mode each ////
Ramey
Joined: 11 Sep 2007 Posts: 18
Posted: Sat Dec 04, 2010 4:11 pm
That's exactly what I did.
I can see that the variable hid_protocol is being set by and returned to the USB stream.
BUT in the example code the variable is not used in any other way. That is, there is no clue as to how this variable should be used !!!. THAT is the essence of my question.
Here is my question, how should my program use the value of this variable (if at all) to make it work at boot time? More broadly, how would the kbmouse examples have to be changed to work at boot time. Boot time means BIOS setup time.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum