libx52
0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
Functions | |
int | libx52_connect (libx52_device *dev) |
Connect to the X52 device. More... | |
int | libx52_disconnect (libx52_device *dev) |
Disconnect from the X52 device. More... | |
bool | libx52_is_connected (libx52_device *dev) |
Check if joystick is connected. More... | |
Handle connections to the device.
These functions allow the application to dynamically connect and disconnect from a supported device.
int libx52_connect | ( | libx52_device * | dev | ) |
Connect to the X52 device.
Attempt to connect to a supported X52/X52Pro joystick. If no supported joysticks are found, it will return LIBX52_ERROR_NO_DEVICE. If any errors are encountered during device enumeration, it will return an appropriate libx52_error_code.
If this function is called after it has already connected to a joystick, then it will re-enumerate the bus and ensure that it is still connected.
[in] | dev | Pointer to the device context |
int libx52_disconnect | ( | libx52_device * | dev | ) |
Disconnect from the X52 device.
This function disconnects any active connections to supported joysticks. Applications must reconnect to the joystick using libx52_connect prior to calling libx52_update.
[in] | dev | Pointer to the device context |
bool libx52_is_connected | ( | libx52_device * | dev | ) |
Check if joystick is connected.
This function reports if it is possible to try to communicate with a supported joystick. The application can communicate with the joystick, only if the following conditions are met.
This function, however, does not check if the joystick is physically connected. A call to libx52_update or libx52_vendor_command will return an error of LIBX52_ERROR_NO_DEVICE if the joystick has either been disconnected, or libx52_connect was never called.
[in] | dev | Pointer to the device context |