libx52
0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
Enumerations | |
enum | libx52_error_code { LIBX52_SUCCESS = 0 , LIBX52_ERROR_INIT_FAILURE , LIBX52_ERROR_OUT_OF_MEMORY , LIBX52_ERROR_INVALID_PARAM , LIBX52_ERROR_NOT_SUPPORTED , LIBX52_ERROR_TRY_AGAIN , LIBX52_ERROR_OUT_OF_RANGE , LIBX52_ERROR_USB_FAILURE , LIBX52_ERROR_IO , LIBX52_ERROR_PERM , LIBX52_ERROR_NO_DEVICE , LIBX52_ERROR_NOT_FOUND , LIBX52_ERROR_BUSY , LIBX52_ERROR_TIMEOUT , LIBX52_ERROR_OVERFLOW , LIBX52_ERROR_PIPE , LIBX52_ERROR_INTERRUPTED } |
LibX52 Error codes. More... | |
enum | libx52_feature { LIBX52_FEATURE_LED } |
Feature support for libx52. More... | |
Functions | |
int | libx52_update (libx52_device *x52) |
Update the X52. More... | |
int | libx52_vendor_command (libx52_device *x52, uint16_t index, uint16_t value) |
Write a raw vendor control packet. More... | |
int | libx52_check_feature (libx52_device *x52, libx52_feature feature) |
Check if the device supports the given feature. More... | |
Miscellaneous functionality
enum libx52_error_code |
LibX52 Error codes.
Error codes returned by libx52
enum libx52_feature |
Feature support for libx52.
Each flag is passed to libx52_check_feature to determine if the connected device has the given feature. This list of features is only limited to those which differ between the supported devices.
Enumerator | |
---|---|
LIBX52_FEATURE_LED | Individual LED control |
int libx52_check_feature | ( | libx52_device * | x52, |
libx52_feature | feature | ||
) |
Check if the device supports the given feature.
This will check if the connected device supports the requested feature. It will return LIBX52_SUCCESS if it does support it, LIBX52_ERROR_NOT_SUPPORTED if it does not, and another libx52_error_code on errors.
[in] | x52 | Pointer to the device context |
[in] | feature | Feature identifier (libx52_feature) |
int libx52_update | ( | libx52_device * | x52 | ) |
Update the X52.
All the libx52_set functions only set the internal data structures, but do not actually write anything to the joystick. This function writes the saved data to the joystick and updates the internal data structures as necessary.
[in] | x52 | Pointer to the device context |
int libx52_vendor_command | ( | libx52_device * | x52, |
uint16_t | index, | ||
uint16_t | value | ||
) |
Write a raw vendor control packet.
This function sends the control packet immediately to the hardware, without having to wait for a call to libx52_update.
This can be used to debug issues seen on the hardware, however, it is NOT recommended for use by end users, as it can potentially damage the hardware.
[in] | x52 | Pointer to the device context |
[in] | index | wIndex in the USB packet |
[in] | value | wValue in the USB packet |