USB HID Joystick - USB Read?

Status
Not open for further replies.

CurlyOz

New member
I'm using the Teensy for a USB Joystick, and I can't seem to figure out where/how it handles data from the computer. I (somewhat) understand the HID packet structure, and sending a packet with usb_joystick_send(). However, If I were to set up an output report to handle Force Feedback, how does the Teensy handle incoming HID packets? I don't expect there to be a usb_joystick_read(), but is there a data structure where the packet is stored (and able to be referenced?).

I've attempted digging through the adapt-ffb-joy project to see where it handles incoming data, but all I can see is where it defines incoming packet structure for later use, but not where the data being defined/structured is coming from. (code is at http://code.google.com/p/adapt-ffb-joy/source/browse/tags/release-0.2.3/ffb.h)

Also, as a first-time poster, if my question has already been answered (I didn't see anywhere on the forums, I've been lurking for a few weeks before registering) please feel free to point me in that direction and moderate this post into oblivion.
 
I guess I should add - I'm using a Teensy 3.1, and the Arduino environment for basic programming and bootloading, with Notepad++ for digging through .h and .c files. I've not had any issues getting analog or digital input to the computer (although that's likely to change when I start modifying the HID descriptor).
 
Status
Not open for further replies.
Back
Top