AN370
Rev. 1.0
37
7.2.6. Button Service Module Structures
tBsr_Setup
Description
: A pointer to a structure of this type is used as an input to the vBsr_Setup()
function. The following table lists the members belonging to the tBsr_Setup structure.
tBsr_PtsElement
Description
: The PTS is made up of an array of these structures. The following table lists
the members belonging to the tBsr_PtsElement structure.
Name
Type
Description
bButtonMask
BYTE
Mask that specifies which buttons to watch for
pushes on:
Value 1 in the given bit position means that pushes/
releases are observed and qualified on that GPIO
input. See GPIO bit mapping table above.
Value 0 means that the associated GPIO input
changes are ignored.
pbPtsReserveHead
Pointer to
BYTE in
XDATA
Pointer to head of array of bytes declared by applica-
tion to reserve space for the PTS. The array of bytes
is actually an array of the tBsr_PtsElement types.
bPtsSize
BYTE
The depth of the PTS FIFO in button pushes (struc-
tures of tBsr_PtsElement type), or the number of
qualified button pushes to be stored at any one time.
bPushQualThresh
BYTE
Number of same consecutive button states needed
to qualify a button push/release.
Name
Type
Description
bButtonVector
BYTE
Vector of bits representing which button was pushed.
1 .. button was pushed (GPIO connected to the ground)
0 .. button was released
See the Button Vector definition above for a mapping of
the GPIO to bit number.
bTimestamp
BYTE
lSys_GetMasterTime() / 32 value which is the time that
the button push/release was qualified.