hidd_button_list_diff()

Get the difference between two button usage lists

Synopsis:

#include <sys/hiddi.h>

int hidd_button_list_diff( _Uint16t *current,
                           _Uint16t *previous,
                           _Uint16t *diff,
                           _Uint16t *len );

Arguments:

current
An array of button usages as returned by hidd_get_buttons().
previous

An array of button usages as returned by hidd_get_buttons().

diff
A user-provided buffer to report the list of usages that are in current but not in previous.
len
The number of elements in the provided buffer. On return it will contain the number usages filled in the provided diff buffer.
Note:
The diff array must contain at least len elements, while the current and previous arrays must either contain at least len elements, or have the last element set to 0.

Description:

The hidd_button_list_diff() function gets the list of buttons that are in current but not in previous. You would typically use this function to determine new buttons pressed in a usage list as returned from hidd_get_buttons(). To get the buttons that have been released you would reverse the arguments. Use hidd_button_list_same() to get a list of buttons that are in both lists.

Returns:

EOK
Success.
EINVAL
One of the arguments is NULL.

Classification:

QNX OS

Safety:
Cancellation point Yes
Signal handler No
Thread Yes
Page updated: