|
x52pro-linux
0.2.1
Saitek X52/X52Pro drivers for Linux/Unix
|
These functions are used at application entry and exit. More...
Typedefs | |
| typedef struct libx52_device | libx52_device |
| Device context structure used by libx52. More... | |
Functions | |
| int | libx52_init (libx52_device **dev) |
| Initialize the X52 library. More... | |
| void | libx52_exit (libx52_device *dev) |
| Exit the library and free up any resources used. More... | |
| int | libx52_connect (libx52_device *dev) |
| Connect to the X52 device. More... | |
| int | libx52_disconnect (libx52_device *dev) |
| Disconnect from the X52 device. More... | |
These functions are used at application entry and exit.
| typedef struct libx52_device libx52_device |
Device context structure used by libx52.
All libx52 API functions require the application to pass in a pointer to a valid device context structure. A pointer can be obtained by calling libx52_init
| 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.
| [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 |
| void libx52_exit | ( | libx52_device * | dev | ) |
Exit the library and free up any resources used.
This function releases any resources allocated by libx52_init and terminates the library. Using the freed device now is invalid and can cause errors.
| [in] | dev | Pointer to the device context |
| int libx52_init | ( | libx52_device ** | dev | ) |
Initialize the X52 library.
This function initializes the libx52 library, sets up any internal data structures to access the joystick, and returns a libx52_device pointer in the output parameter. All calls to libx52 use the returned pointer to control the device.
| [out] | dev | Pointer to a libx52_device *. This function will allocate a device context and return the pointer to the device context in this variable. |
1.8.17