diff --git a/annotated.html b/annotated.html index e106c83..d802e3d 100644 --- a/annotated.html +++ b/annotated.html @@ -1,9 +1,9 @@ - +
- - + +|
- libx52
- 0.3.2
+
+ |
@@ -31,21 +30,22 @@
libx52 0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
|
- libx52
- 0.3.2
+
+ |
@@ -31,21 +30,22 @@
libx52 0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
|
- libx52
- 0.3.2
+
+ |
@@ -31,21 +30,22 @@
libx52 0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
|
- libx52
- 0.3.2
+
+ |
@@ -31,21 +30,22 @@
libx52 0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
|
- libx52
- 0.3.2
+
+ |
@@ -31,21 +30,22 @@
libx52 0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
+Filesfile | x52dcomm.h [code] | | x52dcomm.h | Functions, structures and enumerations for the Saitek X52 MFD & LED daemon communication library. | |||||||
|
- libx52
- 0.3.2
+
+ |
@@ -31,21 +30,22 @@
libx52 0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
|
- libx52
- 0.3.2
+
+ |
@@ -31,21 +30,22 @@
libx52 0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
+Filesfile | libx52io.h [code] | | libx52io.h | Functions, structures and enumerations for the Saitek X52 IO driver library. | |||||||
|
- libx52
- 0.3.2
+
+ |
@@ -31,21 +30,22 @@
libx52 0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
+Filesfile | libx52.h [code] | | libx52.h | Functions, structures and enumerations for the Saitek X52 MFD & LED driver library. | |||||||
|
- libx52
- 0.3.2
+
+ |
@@ -31,21 +30,22 @@
libx52 0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
+Filesfile | libx52util.h [code] | | libx52util.h | Utility functions for the Saitek X52 MFD & LED driver library. | |||||||
|
- libx52
- 0.3.2
+
+ |
@@ -31,21 +30,22 @@
libx52 0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
| ▼ daemon | |
| x52dcomm.h | Functions, structures and enumerations for the Saitek X52 MFD & LED daemon communication library |
| x52dcomm.h | Functions, structures and enumerations for the Saitek X52 MFD & LED daemon communication library |
| ▼ libx52 | |
| libx52.h | Functions, structures and enumerations for the Saitek X52 MFD & LED driver library |
| libx52.h | Functions, structures and enumerations for the Saitek X52 MFD & LED driver library |
| ▼ libx52io | |
| libx52io.h | Functions, structures and enumerations for the Saitek X52 IO driver library |
| libx52io.h | Functions, structures and enumerations for the Saitek X52 IO driver library |
| ▼ libx52util | |
| libx52util.h | Utility functions for the Saitek X52 MFD & LED driver library |
| libx52util.h | Utility functions for the Saitek X52 MFD & LED driver library |
|
- libx52
- 0.3.2
+
+ |
@@ -31,21 +30,22 @@
libx52 0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
|
- libx52
- 0.3.2
+
+ |
@@ -31,21 +30,22 @@
libx52 0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
|
- libx52
- 0.3.2
+
+ |
@@ -31,21 +30,22 @@
libx52 0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
|
- libx52
- 0.3.2
+
+ |
@@ -31,21 +30,22 @@
libx52 0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
|
- libx52
- 0.3.2
+
+ |
@@ -31,21 +30,22 @@
libx52 0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
|
- libx52
- 0.3.2
+
+ |
@@ -31,21 +30,22 @@
libx52 0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
|
- libx52
- 0.3.2
+
+ |
@@ -31,21 +30,22 @@
libx52 0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
|
- libx52
- 0.3.2
+
+ |
@@ -31,21 +30,22 @@
libx52 0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
+Enumerations | | | enum | libx52_clock_id { LIBX52_CLOCK_1 + | enum | libx52_clock_id { LIBX52_CLOCK_1 , LIBX52_CLOCK_2 , LIBX52_CLOCK_3 } | List of supported clocks on the MFD. More... | enum | libx52_clock_format { LIBX52_CLOCK_FORMAT_12HR + | enum | libx52_clock_format { LIBX52_CLOCK_FORMAT_12HR , LIBX52_CLOCK_FORMAT_24HR } | Supported clock formats. More... | enum | libx52_date_format { LIBX52_DATE_FORMAT_DDMMYY + | enum | libx52_date_format { LIBX52_DATE_FORMAT_DDMMYY , LIBX52_DATE_FORMAT_MMDDYY , LIBX52_DATE_FORMAT_YYMMDD } | Supported date formats. More... | ||||||||||
+Functionsint | libx52_set_clock (libx52_device *x52, time_t time, int local) | | Set the clock. More... | int | libx52_set_clock (libx52_device *x52, time_t time, int local) | | int | libx52_set_clock_timezone (libx52_device *x52, libx52_clock_id clock, int offset) | | Set the timezone for the secondary and tertiary clocks. More... | int | libx52_set_clock_timezone (libx52_device *x52, libx52_clock_id clock, int offset) | | int | libx52_set_clock_format (libx52_device *x52, libx52_clock_id clock, libx52_clock_format format) | | Set whether the clock is displayed in 12 hour or 24 hour format. More... | int | libx52_set_clock_format (libx52_device *x52, libx52_clock_id clock, libx52_clock_format format) | | int | libx52_set_time (libx52_device *x52, uint8_t hour, uint8_t minute) | | Set the hour and minute on clock 1. More... | int | libx52_set_time (libx52_device *x52, uint8_t hour, uint8_t minute) | | int | libx52_set_date (libx52_device *x52, uint8_t dd, uint8_t mm, uint8_t yy) | | Set the date. More... | int | libx52_set_date (libx52_device *x52, uint8_t dd, uint8_t mm, uint8_t yy) | | int | libx52_set_date_format (libx52_device *x52, libx52_date_format format) | | Set the date format for the MFD date display. More... | int | libx52_set_date_format (libx52_device *x52, libx52_date_format format) | | Set the clock. | Set the timezone for the secondary and tertiary clocks. | Set whether the clock is displayed in 12 hour or 24 hour format. | Set the hour and minute on clock 1. | Set the date. | Set the date format for the MFD date display. | ||||||||||||||||
Control the clocks on the MFD
Supported clock formats.
List of supported clocks on the MFD.
Supported date formats.
Set the timezone for the secondary and tertiary clocks.
The X52 Pro has a total of 3 clock displays. The secondary and tertiary clocks are controlled as an offset from the primary clock in minutes. However, for convenience, the X52 library calculates this offset internally and only requires you to set the timezone as the number of minutes east of UTC. offset is limited to ± 1440 minutes, and any offset outside this range will result in a return value of LIBX52_ERROR_OUT_OF_RANGE
|
- libx52
- 0.3.2
+
+ |
@@ -31,21 +30,22 @@
libx52 0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
+Functionsint | libx52_connect (libx52_device *dev) | | Connect to the X52 device. More... | int | libx52_connect (libx52_device *dev) | | int | libx52_disconnect (libx52_device *dev) | | Disconnect from the X52 device. More... | int | libx52_disconnect (libx52_device *dev) | | bool | libx52_is_connected (libx52_device *dev) | | Check if joystick is connected. More... | bool | libx52_is_connected (libx52_device *dev) | | Connect to the X52 device. | Disconnect from the X52 device. | Check if joystick is connected. | ||||||||||
Handle connections to the device.
These functions allow the application to dynamically connect and disconnect from a supported device.
|
- libx52
- 0.3.2
+
+ |
@@ -31,21 +30,22 @@
libx52 0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
+Typedefstypedef struct libx52_device | libx52_device | | Device context structure used by libx52. More... | typedef struct libx52_device | libx52_device | | Device context structure used by libx52. | ||||||
+Functionsint | libx52_init (libx52_device **dev) | | Initialize the X52 library. More... | int | libx52_init (libx52_device **dev) | | void | libx52_exit (libx52_device *dev) | | Exit the library and free up any resources used. More... | void | libx52_exit (libx52_device *dev) | | Initialize the X52 library. | Exit the library and free up any resources used. | ||||||||
These functions are used at application entry and exit.
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.
|
- libx52
- 0.3.2
+
+ |
@@ -31,21 +30,22 @@
libx52 0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
+Data Structuresstruct | libx52io_report | | X52 HID Report. More... | | | ||||
+Typedefstypedef struct libx52io_context | libx52io_context | | Device context structure used by libx52io. More... | typedef struct libx52io_context | libx52io_context | | Device context structure used by libx52io. | ||||||
+Enumerationsenum | libx52io_error_code { | LIBX52IO_SUCCESS , LIBX52IO_ERROR_INIT_FAILURE , LIBX52IO_ERROR_NO_DEVICE @@ -100,7 +106,7 @@ Enumerations | enum | libx52io_error_code { + | |||
| libx52 IO error codes More... | |||||||
| enum | libx52io_axis { + | ||||||
| enum | libx52io_axis { LIBX52IO_AXIS_X , LIBX52IO_AXIS_Y , LIBX52IO_AXIS_RZ @@ -119,7 +125,7 @@ Enumerations | ||||||
| X52 Axis definitions. More... | |||||||
| enum | libx52io_button { + | ||||||
| enum | libx52io_button { LIBX52IO_BTN_TRIGGER , LIBX52IO_BTN_TRIGGER_2 , LIBX52IO_BTN_FIRE @@ -174,62 +180,62 @@ Enumerations | ||||||
| X52 Button definitions. More... | |||||||
+Functionsint | libx52io_init (libx52io_context **ctx) | | Initialize the IO library. More... | int | libx52io_init (libx52io_context **ctx) | | void | libx52io_exit (libx52io_context *ctx) | | Exit the library and free up any resources used. More... | void | libx52io_exit (libx52io_context *ctx) | | int | libx52io_open (libx52io_context *ctx) | | Open a connection to a supported joystick. More... | int | libx52io_open (libx52io_context *ctx) | | int | libx52io_close (libx52io_context *ctx) | | Close an existing connection to a supported joystick. More... | int | libx52io_close (libx52io_context *ctx) | | int | libx52io_read_timeout (libx52io_context *ctx, libx52io_report *report, int timeout) | | Read and parse a HID report. More... | int | libx52io_read_timeout (libx52io_context *ctx, libx52io_report *report, int timeout) | | int | libx52io_read (libx52io_context *ctx, libx52io_report *report) | | Read and parse a HID report. More... | int | libx52io_read (libx52io_context *ctx, libx52io_report *report) | | int | libx52io_get_axis_range (libx52io_context *ctx, libx52io_axis axis, int32_t *min, int32_t *max) | | Retrieve the range of an axis. More... | int | libx52io_get_axis_range (libx52io_context *ctx, libx52io_axis axis, int32_t *min, int32_t *max) | | const char * | libx52io_strerror (libx52io_error_code code) | | Get the string representation of an error code. More... | | const char * | libx52io_axis_to_str (libx52io_axis axis) | | Get the string representation of an axis. More... | | const char * | libx52io_button_to_str (libx52io_button button) | | Get the string representation of a button. More... | | uint16_t | libx52io_get_vendor_id (libx52io_context *ctx) | | Get the vendor ID of the connected X52 device. More... | const char * | libx52io_strerror (libx52io_error_code code) | | Get the string representation of an error code. | | const char * | libx52io_axis_to_str (libx52io_axis axis) | | Get the string representation of an axis. | | const char * | libx52io_button_to_str (libx52io_button button) | | Get the string representation of a button. | | uint16_t | libx52io_get_vendor_id (libx52io_context *ctx) | | uint16_t | libx52io_get_product_id (libx52io_context *ctx) | | Get the product ID of the connected X52 device. More... | uint16_t | libx52io_get_product_id (libx52io_context *ctx) | | uint16_t | libx52io_get_device_version (libx52io_context *ctx) | | Get the device version of the connected X52 device. More... | uint16_t | libx52io_get_device_version (libx52io_context *ctx) | | const char * | libx52io_get_manufacturer_string (libx52io_context *ctx) | | Get the manufacturer string of the connected X52 device. More... | | const char * | libx52io_get_product_string (libx52io_context *ctx) | | Get the product string of the connected X52 device. More... | | const char * | libx52io_get_serial_number_string (libx52io_context *ctx) | | Get the serial number of the connected X52 device. More... | | const char * | libx52io_get_manufacturer_string (libx52io_context *ctx) | | Get the manufacturer string of the connected X52 device. | | const char * | libx52io_get_product_string (libx52io_context *ctx) | | Get the product string of the connected X52 device. | | const char * | libx52io_get_serial_number_string (libx52io_context *ctx) | | Get the serial number of the connected X52 device. | | Initialize the IO library. | Exit the library and free up any resources used. | Open a connection to a supported joystick. | Close an existing connection to a supported joystick. | Read and parse a HID report. | Read and parse a HID report. | Retrieve the range of an axis. | Get the vendor ID of the connected X52 device. | Get the product ID of the connected X52 device. | Get the device version of the connected X52 device. | ||||||||||||||||||||||||||||||||||||
These functions allow an application to connect to a supported X52/X52Pro joystick and read the state of the buttons and axes.
X52 Axis definitions.
X52 Button definitions.
libx52 IO error codes
Error codes returned by libx52io
| const char* libx52io_axis_to_str | +const char * libx52io_axis_to_str | ( | libx52io_axis | axis | ) | @@ -443,14 +449,14 @@ Functions||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const char* libx52io_button_to_str | +const char * libx52io_button_to_str | ( | libx52io_button | button | ) | @@ -470,8 +476,8 @@ Functions||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const char* libx52io_get_manufacturer_string | +const char * libx52io_get_manufacturer_string | ( | libx52io_context * | ctx | ) | @@ -643,8 +649,8 @@ Functions||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const char* libx52io_get_product_string | +const char * libx52io_get_product_string | ( | libx52io_context * | ctx | ) | @@ -698,14 +704,14 @@ Functions||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const char* libx52io_get_serial_number_string | +const char * libx52io_get_serial_number_string | ( | libx52io_context * | ctx | ) | @@ -726,8 +732,8 @@ Functions||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const char* libx52io_strerror | +const char * libx52io_strerror | ( | libx52io_error_code | code | ) | @@ -955,7 +961,7 @@ Functions||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
- libx52
- 0.3.2
+
+ |
@@ -31,21 +30,22 @@
libx52 0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
+Enumerationsenum | libx52_led_id { | LIBX52_LED_FIRE = 0x01 , LIBX52_LED_A = 0x02 , LIBX52_LED_B = 0x04 @@ -91,7 +97,7 @@ Enumerations | enum | libx52_led_id { + | |||
| Supported LED identifiers. More... | |||||||
| enum | libx52_led_state { + | ||||||
| enum | libx52_led_state { LIBX52_LED_STATE_OFF , LIBX52_LED_STATE_ON , LIBX52_LED_STATE_RED @@ -103,29 +109,29 @@ Enumerations | ||||||
| Supported LED states. More... | |||||||
+Functionsint | libx52_set_text (libx52_device *x52, uint8_t line, const char *text, uint8_t length) | | Set the text on an MFD line. More... | int | libx52_set_text (libx52_device *x52, uint8_t line, const char *text, uint8_t length) | | int | libx52_set_led_state (libx52_device *x52, libx52_led_id led, libx52_led_state state) | | Set the LED state. More... | int | libx52_set_led_state (libx52_device *x52, libx52_led_id led, libx52_led_state state) | | int | libx52_set_brightness (libx52_device *x52, uint8_t mfd, uint16_t brightness) | | Set the MFD or LED brightness. More... | int | libx52_set_brightness (libx52_device *x52, uint8_t mfd, uint16_t brightness) | | int | libx52_set_shift (libx52_device *x52, uint8_t state) | | Set the state of the shift indicator. More... | int | libx52_set_shift (libx52_device *x52, uint8_t state) | | int | libx52_set_blink (libx52_device *x52, uint8_t state) | | Set the blinking state. More... | int | libx52_set_blink (libx52_device *x52, uint8_t state) | | Set the text on an MFD line. | Set the LED state. | Set the MFD or LED brightness. | Set the state of the shift indicator. | Set the blinking state. | ||||||||||||||
Control the MFD text and LED states
Supported LED identifiers.
Supported LED states.
Not all LEDs support all states
|
- libx52
- 0.3.2
+
+ |
@@ -31,21 +30,22 @@
libx52 0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
+Enumerationsenum | libx52_error_code { | LIBX52_SUCCESS = 0 , LIBX52_ERROR_INIT_FAILURE , LIBX52_ERROR_OUT_OF_MEMORY @@ -99,28 +105,28 @@ Enumerations | enum | libx52_error_code { + | |||
| LibX52 Error codes. More... | |||||||
| enum | libx52_feature { LIBX52_FEATURE_LED + | ||||||
| enum | libx52_feature { LIBX52_FEATURE_LED } | ||||||
| Feature support for libx52. More... | |||||||
+Functionsint | libx52_update (libx52_device *x52) | | Update the X52. More... | int | libx52_update (libx52_device *x52) | | int | libx52_vendor_command (libx52_device *x52, uint16_t index, uint16_t value) | | Write a raw vendor control packet. More... | int | libx52_vendor_command (libx52_device *x52, uint16_t index, uint16_t value) | | int | libx52_check_feature (libx52_device *x52, libx52_feature feature) | | Check if the device supports the given feature. More... | int | libx52_check_feature (libx52_device *x52, libx52_feature feature) | | Update the X52. | Write a raw vendor control packet. | Check if the device supports the given feature. | ||||||||||
Miscellaneous functionality
LibX52 Error codes.
Error codes returned by libx52
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 + |
| Enumerator | |
| LIBX52_FEATURE_LED | Individual LED control |
|
- libx52
- 0.3.2
+
+ |
@@ -31,21 +30,22 @@
libx52 0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
+Functionsconst char * | libx52_strerror (libx52_error_code error) | | Return a string representation of the error code. More... | | const char * | libx52_clock_id_to_str (libx52_clock_id id) | | Returns a string representation of the clock ID. More... | | const char * | libx52_clock_format_to_str (libx52_clock_format format) | | Returns a string representation of the clock format. More... | | const char * | libx52_date_format_to_str (libx52_date_format format) | | Returns a string representation of the date format. More... | | const char * | libx52_led_id_to_str (libx52_led_id id) | | Returns a string representation of the LED. More... | | const char * | libx52_led_state_to_str (libx52_led_state state) | | Returns a string representation of the LED state. More... | | const char * | libx52_strerror (libx52_error_code error) | | Return a string representation of the error code. | | const char * | libx52_clock_id_to_str (libx52_clock_id id) | | Returns a string representation of the clock ID. | | const char * | libx52_clock_format_to_str (libx52_clock_format format) | | Returns a string representation of the clock format. | | const char * | libx52_date_format_to_str (libx52_date_format format) | | Returns a string representation of the date format. | | const char * | libx52_led_id_to_str (libx52_led_id id) | | Returns a string representation of the LED. | | const char * | libx52_led_state_to_str (libx52_led_state state) | | Returns a string representation of the LED state. | | ||||||||||||||||
Translation APIs from enumerations to string, primarily for logging.
| const char* libx52_clock_format_to_str | +const char * libx52_clock_format_to_str | ( | libx52_clock_format | format | ) | @@ -121,14 +127,14 @@ Functions||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const char* libx52_clock_id_to_str | +const char * libx52_clock_id_to_str | ( | libx52_clock_id | id | ) | @@ -148,14 +154,14 @@ Functions||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const char* libx52_date_format_to_str | +const char * libx52_date_format_to_str | ( | libx52_date_format | format | ) | @@ -175,14 +181,14 @@ Functions||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const char* libx52_led_id_to_str | +const char * libx52_led_id_to_str | ( | libx52_led_id | id | ) | @@ -202,14 +208,14 @@ Functions||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const char* libx52_led_state_to_str | +const char * libx52_led_state_to_str | ( | libx52_led_state | state | ) | @@ -229,14 +235,14 @@ Functions||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const char* libx52_strerror | +const char * libx52_strerror | ( | libx52_error_code | error | ) | @@ -259,7 +265,7 @@ Functions||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
- libx52
- 0.3.2
+
+ |
@@ -31,21 +30,22 @@
libx52 0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
+Functionsint | libx52util_convert_utf8_string (const uint8_t *input, uint8_t *output, size_t *len) | | Convert UTF8 string to X52 character map. More... | int | libx52util_convert_utf8_string (const uint8_t *input, uint8_t *output, size_t *len) | | Convert UTF8 string to X52 character map. | ||||||
These functions simplify some of the data handling for MFD & LED control.
|
- libx52
- 0.3.2
+
+ |
@@ -31,21 +30,22 @@
libx52 0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
+Typedefs
-typedef int(* | x52d_notify_callback_fn) (int argc, char **argv) | | +typedef int(* | x52d_notify_callback_fn) (int argc, char **argv) | Notification callback function type. | ||||||
+Functionsint | x52d_dial_command (const char *sock_path) | | Open a connection to the daemon command socket. More... | int | x52d_dial_command (const char *sock_path) | | int | x52d_dial_notify (const char *sock_path) | | Open a connection to the daemon notify socket. More... | int | x52d_dial_notify (const char *sock_path) | | int | x52d_format_command (int argc, const char **argv, char *buffer, size_t buflen) | | Format a series of command strings into a buffer. More... | int | x52d_format_command (int argc, const char **argv, char *buffer, size_t buflen) | | int | x52d_send_command (int sock_fd, char *buffer, size_t bufin, size_t bufout) | | Send a command to the daemon and retrieve the response. More... | int | x52d_send_command (int sock_fd, char *buffer, size_t bufin, size_t bufout) | | int | x52d_recv_notification (int sock_fd, x52d_notify_callback_fn callback) | | Receive a notification from the daemon. More... | int | x52d_recv_notification (int sock_fd, x52d_notify_callback_fn callback) | | Open a connection to the daemon command socket. | Open a connection to the daemon notify socket. | Format a series of command strings into a buffer. | Send a command to the daemon and retrieve the response. | Receive a notification from the daemon. | ||||||||||||||
These functions are used to communicate with the X52 daemon.
|
- libx52
- 0.3.2
+
+ |
@@ -31,21 +30,22 @@
libx52 0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
Go to the source code of this file.
+Typedefstypedef struct libx52_device | libx52_device | | Device context structure used by libx52. More... | typedef struct libx52_device | libx52_device | | Device context structure used by libx52. | ||||||
+Functionsint | libx52_init (libx52_device **dev) | | Initialize the X52 library. More... | int | libx52_init (libx52_device **dev) | | void | libx52_exit (libx52_device *dev) | | Exit the library and free up any resources used. More... | void | libx52_exit (libx52_device *dev) | | int | libx52_connect (libx52_device *dev) | | Connect to the X52 device. More... | int | libx52_connect (libx52_device *dev) | | int | libx52_disconnect (libx52_device *dev) | | Disconnect from the X52 device. More... | int | libx52_disconnect (libx52_device *dev) | | bool | libx52_is_connected (libx52_device *dev) | | Check if joystick is connected. More... | bool | libx52_is_connected (libx52_device *dev) | | int | libx52_set_text (libx52_device *x52, uint8_t line, const char *text, uint8_t length) | | Set the text on an MFD line. More... | int | libx52_set_text (libx52_device *x52, uint8_t line, const char *text, uint8_t length) | | int | libx52_set_led_state (libx52_device *x52, libx52_led_id led, libx52_led_state state) | | Set the LED state. More... | int | libx52_set_led_state (libx52_device *x52, libx52_led_id led, libx52_led_state state) | | int | libx52_set_clock (libx52_device *x52, time_t time, int local) | | Set the clock. More... | int | libx52_set_clock (libx52_device *x52, time_t time, int local) | | int | libx52_set_clock_timezone (libx52_device *x52, libx52_clock_id clock, int offset) | | Set the timezone for the secondary and tertiary clocks. More... | int | libx52_set_clock_timezone (libx52_device *x52, libx52_clock_id clock, int offset) | | int | libx52_set_clock_format (libx52_device *x52, libx52_clock_id clock, libx52_clock_format format) | | Set whether the clock is displayed in 12 hour or 24 hour format. More... | int | libx52_set_clock_format (libx52_device *x52, libx52_clock_id clock, libx52_clock_format format) | | int | libx52_set_time (libx52_device *x52, uint8_t hour, uint8_t minute) | | Set the hour and minute on clock 1. More... | int | libx52_set_time (libx52_device *x52, uint8_t hour, uint8_t minute) | | int | libx52_set_date (libx52_device *x52, uint8_t dd, uint8_t mm, uint8_t yy) | | Set the date. More... | int | libx52_set_date (libx52_device *x52, uint8_t dd, uint8_t mm, uint8_t yy) | | int | libx52_set_date_format (libx52_device *x52, libx52_date_format format) | | Set the date format for the MFD date display. More... | int | libx52_set_date_format (libx52_device *x52, libx52_date_format format) | | int | libx52_set_brightness (libx52_device *x52, uint8_t mfd, uint16_t brightness) | | Set the MFD or LED brightness. More... | int | libx52_set_brightness (libx52_device *x52, uint8_t mfd, uint16_t brightness) | | int | libx52_set_shift (libx52_device *x52, uint8_t state) | | Set the state of the shift indicator. More... | int | libx52_set_shift (libx52_device *x52, uint8_t state) | | int | libx52_set_blink (libx52_device *x52, uint8_t state) | | Set the blinking state. More... | int | libx52_set_blink (libx52_device *x52, uint8_t state) | | int | libx52_update (libx52_device *x52) | | Update the X52. More... | int | libx52_update (libx52_device *x52) | | int | libx52_vendor_command (libx52_device *x52, uint16_t index, uint16_t value) | | Write a raw vendor control packet. More... | int | libx52_vendor_command (libx52_device *x52, uint16_t index, uint16_t value) | | int | libx52_check_feature (libx52_device *x52, libx52_feature feature) | | Check if the device supports the given feature. More... | int | libx52_check_feature (libx52_device *x52, libx52_feature feature) | | const char * | libx52_strerror (libx52_error_code error) | | Return a string representation of the error code. More... | | const char * | libx52_clock_id_to_str (libx52_clock_id id) | | Returns a string representation of the clock ID. More... | | const char * | libx52_clock_format_to_str (libx52_clock_format format) | | Returns a string representation of the clock format. More... | | const char * | libx52_date_format_to_str (libx52_date_format format) | | Returns a string representation of the date format. More... | | const char * | libx52_led_id_to_str (libx52_led_id id) | | Returns a string representation of the LED. More... | | const char * | libx52_led_state_to_str (libx52_led_state state) | | Returns a string representation of the LED state. More... | | const char * | libx52_strerror (libx52_error_code error) | | Return a string representation of the error code. | | const char * | libx52_clock_id_to_str (libx52_clock_id id) | | Returns a string representation of the clock ID. | | const char * | libx52_clock_format_to_str (libx52_clock_format format) | | Returns a string representation of the clock format. | | const char * | libx52_date_format_to_str (libx52_date_format format) | | Returns a string representation of the date format. | | const char * | libx52_led_id_to_str (libx52_led_id id) | | Returns a string representation of the LED. | | const char * | libx52_led_state_to_str (libx52_led_state state) | | Returns a string representation of the LED state. | | Initialize the X52 library. | Exit the library and free up any resources used. | Connect to the X52 device. | Disconnect from the X52 device. | Check if joystick is connected. | Set the text on an MFD line. | Set the LED state. | Set the clock. | Set the timezone for the secondary and tertiary clocks. | Set whether the clock is displayed in 12 hour or 24 hour format. | Set the hour and minute on clock 1. | Set the date. | Set the date format for the MFD date display. | Set the MFD or LED brightness. | Set the state of the shift indicator. | Set the blinking state. | Update the X52. | Write a raw vendor control packet. | Check if the device supports the given feature. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
Functions, structures and enumerations for the Saitek X52 MFD & LED driver library.
This file contains the type, enum and function prototypes for the Saitek X52 driver library. These functions allow an application to connect to a supported X52/X52Pro joystick and control the MFD and LEDs.
- +|
- libx52
- 0.3.2
+
+ |
@@ -31,22 +30,28 @@
libx52 0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
|
- libx52
- 0.3.2
+
+ |
@@ -31,21 +30,22 @@
libx52 0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
|
- libx52
- 0.3.2
+
+ |
@@ -31,21 +30,22 @@
libx52 0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
libx52 performs all its operations with a device context pointer. The application must call libx52_init before performing any operation, and must call libx52_exit prior to terminating.
@@ -72,22 +78,22 @@ $(function() {Example Initialization/Deinitialization Code
Most libx52 functions to update the joystick state do not directly write to the connected joystick, but only update internal data structures within the device context. In order to actually update the joystick, the application must call libx52_update. This function writes the updates to the joystick and resets any internal state.
Example
-Most libx52 functions return a standard libx52_error_code integer value that indicates the status of the operation. As long as the operation succeeded, the function will return LIBX52_SUCCESS. Other values returned indicate a failure of some sort.
-libx52_strerror can convert the return code into a descriptive string that may be displayed to users.
+libx52_strerror can convert the return code into a descriptive string that may be displayed to users.
libx52_strerror automatically handles internationalization. As long as your application sets up the locale correctly, and the error strings have been translated to that locale, the returned strings will correspond to the translated values for your locale.
+libx52_strerror automatically handles internationalization. As long as your application sets up the locale correctly, and the error strings have been translated to that locale, the returned strings will correspond to the translated values for your locale.
|
- libx52
- 0.3.2
+
+ |
@@ -31,21 +30,22 @@
libx52 0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
Go to the source code of this file.
+Data Structuresstruct | libx52io_report | | X52 HID Report. More... | | | ||||
+Typedefstypedef struct libx52io_context | libx52io_context | | Device context structure used by libx52io. More... | typedef struct libx52io_context | libx52io_context | | Device context structure used by libx52io. | ||||||
+Enumerationsenum | libx52io_error_code { | LIBX52IO_SUCCESS , LIBX52IO_ERROR_INIT_FAILURE , LIBX52IO_ERROR_NO_DEVICE @@ -109,7 +115,7 @@ Enumerations | enum | libx52io_error_code { + | |||
| libx52 IO error codes More... | |||||||
| enum | libx52io_axis { + | ||||||
| enum | libx52io_axis { LIBX52IO_AXIS_X , LIBX52IO_AXIS_Y , LIBX52IO_AXIS_RZ @@ -128,7 +134,7 @@ Enumerations | ||||||
| X52 Axis definitions. More... | |||||||
| enum | libx52io_button { + | ||||||
| enum | libx52io_button { LIBX52IO_BTN_TRIGGER , LIBX52IO_BTN_TRIGGER_2 , LIBX52IO_BTN_FIRE @@ -183,65 +189,65 @@ Enumerations | ||||||
| X52 Button definitions. More... | |||||||
+Functionsint | libx52io_init (libx52io_context **ctx) | | Initialize the IO library. More... | int | libx52io_init (libx52io_context **ctx) | | void | libx52io_exit (libx52io_context *ctx) | | Exit the library and free up any resources used. More... | void | libx52io_exit (libx52io_context *ctx) | | int | libx52io_open (libx52io_context *ctx) | | Open a connection to a supported joystick. More... | int | libx52io_open (libx52io_context *ctx) | | int | libx52io_close (libx52io_context *ctx) | | Close an existing connection to a supported joystick. More... | int | libx52io_close (libx52io_context *ctx) | | int | libx52io_read_timeout (libx52io_context *ctx, libx52io_report *report, int timeout) | | Read and parse a HID report. More... | int | libx52io_read_timeout (libx52io_context *ctx, libx52io_report *report, int timeout) | | int | libx52io_read (libx52io_context *ctx, libx52io_report *report) | | Read and parse a HID report. More... | int | libx52io_read (libx52io_context *ctx, libx52io_report *report) | | int | libx52io_get_axis_range (libx52io_context *ctx, libx52io_axis axis, int32_t *min, int32_t *max) | | Retrieve the range of an axis. More... | int | libx52io_get_axis_range (libx52io_context *ctx, libx52io_axis axis, int32_t *min, int32_t *max) | | const char * | libx52io_strerror (libx52io_error_code code) | | Get the string representation of an error code. More... | | const char * | libx52io_axis_to_str (libx52io_axis axis) | | Get the string representation of an axis. More... | | const char * | libx52io_button_to_str (libx52io_button button) | | Get the string representation of a button. More... | | uint16_t | libx52io_get_vendor_id (libx52io_context *ctx) | | Get the vendor ID of the connected X52 device. More... | const char * | libx52io_strerror (libx52io_error_code code) | | Get the string representation of an error code. | | const char * | libx52io_axis_to_str (libx52io_axis axis) | | Get the string representation of an axis. | | const char * | libx52io_button_to_str (libx52io_button button) | | Get the string representation of a button. | | uint16_t | libx52io_get_vendor_id (libx52io_context *ctx) | | uint16_t | libx52io_get_product_id (libx52io_context *ctx) | | Get the product ID of the connected X52 device. More... | uint16_t | libx52io_get_product_id (libx52io_context *ctx) | | uint16_t | libx52io_get_device_version (libx52io_context *ctx) | | Get the device version of the connected X52 device. More... | uint16_t | libx52io_get_device_version (libx52io_context *ctx) | | const char * | libx52io_get_manufacturer_string (libx52io_context *ctx) | | Get the manufacturer string of the connected X52 device. More... | | const char * | libx52io_get_product_string (libx52io_context *ctx) | | Get the product string of the connected X52 device. More... | | const char * | libx52io_get_serial_number_string (libx52io_context *ctx) | | Get the serial number of the connected X52 device. More... | | const char * | libx52io_get_manufacturer_string (libx52io_context *ctx) | | Get the manufacturer string of the connected X52 device. | | const char * | libx52io_get_product_string (libx52io_context *ctx) | | Get the product string of the connected X52 device. | | const char * | libx52io_get_serial_number_string (libx52io_context *ctx) | | Get the serial number of the connected X52 device. | | Initialize the IO library. | Exit the library and free up any resources used. | Open a connection to a supported joystick. | Close an existing connection to a supported joystick. | Read and parse a HID report. | Read and parse a HID report. | Retrieve the range of an axis. | Get the vendor ID of the connected X52 device. | Get the product ID of the connected X52 device. | Get the device version of the connected X52 device. | ||||||||||||||||||||||||||||||||||||
Functions, structures and enumerations for the Saitek X52 IO driver library.
This file contains the type, enum and function prototypes for the Saitek X52 IO driver library. These functions allow an application to connect to a supported X52/X52Pro joystick and read the state of the buttons and axes.
- +|
- libx52
- 0.3.2
+
+ |
@@ -31,22 +30,28 @@
libx52 0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
|
- libx52
- 0.3.2
+
+ |
@@ -31,21 +30,22 @@
libx52 0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|