lmercor
Joined: 31 May 2007 Posts: 20
|
USB descriptor HELP |
Posted: Wed Jun 20, 2007 5:21 pm |
|
|
well I'm working with USB and I'm using the descriptor that comes wiht the compiler ( usb_desc_hid.h), but I'm want to send 5 bytes instead of 2. the descriptor provided in the compiler sends 2 bytes so, if I want to send 5 bytes, i'm not pretty sure if is just to change the number in the descriptor or something else.
Code: | #IFNDEF __USB_DESCRIPTORS__
#DEFINE __USB_DESCRIPTORS__
#include <usb.h>
const char USB_CLASS_SPECIFIC_DESC[] = {
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, 2, // Report count = 16 bits (2 bytes) ==> HERE
0x81, 2, // Input (Data, Var, Abs)
0x19, 1, // Usage minimum
0x29, 8, // Usage maximum
0x75, 8, // Report size = 8 (bits)
0x95, 2, // Report count = 16 bits (2 bytes) ==> HERE
0x91, 2, // Output (Data, Var, Abs)
0xc0 // End Collection
};
|
is there anything else I have to change?
I'm not very familiar with the descriptors is the first time for me. |
|