AN370
Rev. 1.0
39
wBsr_GetCurrentButton
Description
: Returns information associated with the latest qualified button push/release.
If no pushes have been qualified, it returns 0. The function does not remove the informa-
tion from the PTS.
It is the latest information which was pushed at the end of the FIFO if the FIFO was not
full before the push. If the FIFO was full then this is the information which would have
been pushed, but was dropped, unless it was “no button pressed” change, which gets
pushed to the FIFO after it is cleared if the FIFO was full.
The user can use this function to skip over the FIFO content to look ahead what the latest
qualified state of the buttons is. The user still needs to check whether the FIFO has any
items in it.
Inputs
:
None
Outputs
:
Button vector and timestamp: (WORD) Upper byte of the word is the timestamp
byte. The Lower byte of word is the button vector. Effectively it is a structure of
type tBsr_PtsElement packed into the WORD type.
vBsr_InitPts
Description
: Initializes the PTS. It initializes the FIFO pointers and clears the contents of
the PTS. It is also called from vBsr_Setup() function.
Inputs
:
biPtsSize: (BYTE) Number of elements can be stored in the PTS. Each element
consists of two bytes, since elements are of the type tBsr_PtsElement.
Outputs
:
None