33
Poll_Endpt1
Returns: bb xx yy zz tw
bb = button byte
xx = X motion byte
yy = Y motion byte
zz = Z motion byte (if Z-Wheel)
tw = tilt wheel byte
Default: Ignore request
Addressed: Ignore request
Con gured: Accept (NAK if no data; Send packet if available)
Notes: See also Get_HID_Input. Endpt will only stall if halt bit is set by Set_Feature_Endpt1. Details
of data packet are below
Endpt1 should be polled at least every 10 frames (mS). It is typically polled every 8 frames
on Windows machines. For internal testing, Endpt1 can be continuously polled if desired.
The chip will not generate any report packets unless in the Con gured state.
If Endpt1 is currently empty, any motion or button change will be loaded into the Endpt1
bu ers. Once the Endpt1 bu ers are full, any further motion events will get accumulated.
When the Endpt1 bu ers are later polled and emptied, the current accumulated X/Y/Z
values will be loaded into the Endpt1 bu ers. After transferring their data, the accumula-
tion registers are reset so they are ready to start accumulating new motion events.
Button information is handled a bit di erently. If the Endpt1 bu ers are empty, and a
button change event occurs, the new button state is put into the Endpt1 bu ers. At the
same time, the button state that is put in Endpt1 is copied for later use. While Endpt1 is
full, changes in button state are essentially ignored. When Endpt1 is emptied, if the current
button state is di erent than that which was last loaded into Endpt1, then the new state
will be loaded and a new copy saved. Basically, the button state that is loaded into Endpt1
is always the current button state at that point in time. It should also be noted that there is
hardware on the chip to help de-bounce the buttons.
Special note on wLength: The wLength paramater in commands speci es the maximum number of bytes a device
should send back. The commands listed below are not able to handle a wLength of 0 cor-
rectly.
Get_Status_Device
Get_Status_Interface
Get_Status_Endpt0
Get_Status_Endpt1
Get_Con guration
Get_Interface
This chip will send one byte of data rather than none when wLength=0 is requested for the
above commands.