|
|
View previous topic :: View next topic |
Author |
Message |
lferrari
Joined: 02 Jun 2004 Posts: 7 Location: WM
|
HID packet size |
Posted: Fri Oct 15, 2004 4:48 am |
|
|
Hi,
I'm using pic16c745 as usb driver. I compiled it and loaded it usefully. now I'm tryng to change the spec from two bytes to 8 bytes but for any reason the ccs sample ex_usb_hid.c wont let change much.
I have tried to change as per spec the..
#define USB_EP1_TX_ENABLE 1 //turn on EP1 for IN bulk/interrupt transfers
#define USB_EP1_TX_SIZE 8 //if you change this, be sure to change the hid descriptor
//the following defines needed for the CCS USB PIC driver to enable the RX endpoint 1
#define USB_EP1_RX_ENABLE 1 //turn on EP1 for OUT bulk/interrupt transfers
#define USB_EP1_RX_SIZE 8 //if you change this, be sure to change the hid descriptor
..but when I connect it into the pc it's recognised then it transmit just once and it stops and to get it to work again I have to unplug it and plug it back on, then it will do the same.
I'm not sure if it has something to do with the USB_HID_DESC[] I have tried to change the input and output size on it but with not any different result.
I presume I'm missing something somewhere on the line.
If anyone knows how to change it please let me know.
Many Thanks |
|
|
zio_pecos
Joined: 24 Oct 2004 Posts: 21 Location: italy
|
|
Posted: Sun Oct 24, 2004 1:51 am |
|
|
#define USB_EP1_TX_ENABLE 1 //turn on EP1 for IN bulk/interrupt transfers
#define USB_EP1_TX_SIZE 8 //if you change this, be sure to change the hid descriptor [/u]
//the following defines needed for the CCS USB PIC driver to enable the RX endpoint 1
#define USB_EP1_RX_ENABLE 1 //turn on EP1 for OUT bulk/interrupt transfers
#define USB_EP1_RX_SIZE 8 //if you change this, be sure to change the hid descriptor
you said that you changed these lines...
did you changed the hid descriptor??
look here
[...]
BYTE CONST USB_HID_DESC[] = { //len=28
6, 0, 255, // Usage Page = Vendor Defined
9, 1, // Usage = IO device
0xa1, 1, // Collection = Application
0x19, 1, // Usage minimum
0x29, 8, // Usage maximum
0x15, 0x80, // Logical minimum (-128)
0x25, 0x7F, // Logical maximum (127)
0x75, 8, // Report size = 8 (bits)
0x95, 8, // Report count = 16 bits (2 bytes)
0x81, 2, // Input (Data, Var, Abs)
0x19, 1, // Usage minimum
0x29, 8, // Usage maximum
0x91, 2, // Output (Data, Var, Abs)
0xc0 // End Collection
};
you only have to set the cyan line as i did
good luck |
|
|
|
|
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
|
Powered by phpBB © 2001, 2005 phpBB Group
|