Initialize the resources required for the HID module.
Synopsis:
#include <btapi/bthid.h>
int bt_hid_init(bt_hid_callbacks_t *cb)
Arguments:
- cb
-
The list of callbacks to be used for HID Device callbacks.
Library:
libbtapi (For the qcc command, use the -l btapi option to link against this library)
Description:
You must call this function before using any other functions in the library. If you call this function successfully, call the bt_hid_deinit() function when your application has finished using the HID module.
Returns:
0 is returned when initialization is successful,
-1 with the
errno set. The error codes that can be returned are as follows:
- EBUSY: The HID module has already been initialized.
- EINVAL: Callbacks are not provided.
- EACCESS: Insufficient permissions to initialize functionality.
- ENOMEM: Insufficient memory is available to perform the request.
- ESRVRFAULT: An internal error has occurred.