Search found 24 matches

by Rukus
Tue Nov 06, 2007 10:38 pm
Forum: V-USB
Topic: General joystick HID question
Replies: 35
Views: 38970

I was just using the Hid Descriptor tool and I called up a mouse and noticed it looked alot like your declarations except for the fact that the X and Y position is only 8 bit. If you are creating a mouse, you would want relitive on the axises, however i wouldn't expect you would need a 16 bit number...
by Rukus
Tue Nov 06, 2007 10:06 pm
Forum: V-USB
Topic: General joystick HID question
Replies: 35
Views: 38970

it may also have something to do with the way you are declaring the buttons. I'd get rid of the 0x95, 0x01, // REPORT_COUNT (1) 0x75, 0x05, // REPORT_SIZE (5) 0x81, 0x03, // INPUT (Cnst,Var,Abs) 0x05, 0x01, // USAGE_PAGE (Generic Desktop) and define buttons 1 - 8 with...
by Rukus
Tue Nov 06, 2007 9:58 pm
Forum: V-USB
Topic: General joystick HID question
Replies: 35
Views: 38970

No, I use also uchar, otherwise it wouldn't work when doing usbMsgPtr = reportBuffer in usbFunctionSetup() because usbMsgPtr is uchar by AVR-USB's internals. Does it also work with my descriptor above on your setup, that you can step trough all pixels? Is my main() above ok? I cant test it because ...
by Rukus
Tue Nov 06, 2007 9:29 pm
Forum: V-USB
Topic: General joystick HID question
Replies: 35
Views: 38970

I don't know how you have your array defined, but I have mine setup as a uchar. If somehow you were sending it a number with the high bit set, it would be interepreted as a 2's complement negitive number. just a thought. uchar AxisBuf[8] ; AxisBuf[0]=0xff; AxisBuf[1]=0x03; AxisBuf[2]=0xff; AxisBuf[3...
by Rukus
Tue Nov 06, 2007 9:11 pm
Forum: V-USB
Topic: General joystick HID question
Replies: 35
Views: 38970

I just tested it on my end with the HID Report Decriptor I posted and I don't see any problem. I was able to step each axis 1 point at a time down from the (1024 and 768) down to (1022 and 766) and saw now deveation from what I was sending it. Either you changed something in the Report that I don't ...
by Rukus
Tue Nov 06, 2007 8:53 pm
Forum: V-USB
Topic: General joystick HID question
Replies: 35
Views: 38970

post your Hid Report Descriptor so I can test it here with what you have. I didn't use physical max and min. perhaps that is where the problem lies?
by Rukus
Tue Nov 06, 2007 6:17 pm
Forum: V-USB
Topic: General joystick HID question
Replies: 35
Views: 38970

Just a quick note on report sizes: AVR-USB can handle longer reports than 8 bytes with a trick. If you want to send (say) 12 bytes, use usbSetInterrupt() for the first 8 bytes, then wait for usbInterruptIsReady() and then send the remaining 4 bytes with usbSetInterrupt(). This is not really intuiti...
by Rukus
Tue Nov 06, 2007 6:15 pm
Forum: V-USB
Topic: General joystick HID question
Replies: 35
Views: 38970

Ok, I got this to work without any problems. This may or not be proper form, however it is working. static char hidDescrReport[] PROGMEM = { // Report descriptor 0x05, 0x01, // USAGE_PAGE (Generic Desktop) 0x09, 0x04, // USAGE (Joystick) 0xa1, 0x01, // COLLECTION (Applicatio...
by Rukus
Tue Nov 06, 2007 3:54 pm
Forum: V-USB
Topic: General joystick HID question
Replies: 35
Views: 38970

Posted: Tue Nov 06, 2007 2:36 pm Post subject: -------------------------------------------------------------------------------- Hm, I tried using resport_size (16) and report_count (2), but then I don't know how to save my 16 bit values in the reportBuffer. Because each item is just 8bit (uchar). A...