|
libx52 0.3.3
Saitek X52/X52Pro drivers for Linux/Unix
|
Utility functions for the Saitek X52 MFD & LED driver library. More...
Go to the source code of this file.
Functions | |
| LIBX52UTIL_API int | libx52util_convert_utf8_string (const uint8_t *input, uint8_t *output, size_t *len) |
| Convert UTF8 string to X52 character map. | |
MFD line scrolling | |
Step a 16-cell window over a virtual tape of X52 MFD display bytes (same encoding as libx52_set_text / libx52util_convert_utf8_string output). Cell count follows convert semantics (multi-byte glyphs use multiple cells). Default wrap: unless LIBX52UTIL_SCROLL_SINGLE_PASS is set, each libx52util_scroll_next() advances the window modulo the tape period so the marquee loops until libx52util_scroll_reset() or libx52util_scroll_free(). These routines are not thread-safe; callers must serialize access to a given libx52util_scroll_state. | |
| enum | libx52util_scroll_flags { } |
| Bitwise flags for libx52util_scroll_new(). More... | |
| typedef struct libx52util_scroll | libx52util_scroll_state |
| LIBX52UTIL_API int | libx52util_scroll_new (libx52util_scroll_state **state, const uint8_t *utf8_string, libx52util_scroll_flags flags) |
| Allocate scroll state from a UTF-8 string. | |
| LIBX52UTIL_API void | libx52util_scroll_free (libx52util_scroll_state **state) |
| Free scroll state. | |
| LIBX52UTIL_API int | libx52util_scroll_reset (libx52util_scroll_state *state) |
| Rewind the scroll window to the initial position. | |
| LIBX52UTIL_API int | libx52util_scroll_next (libx52util_scroll_state *state, uint8_t display[16]) |
| Emit the next 16-byte MFD line for the current window. | |
Utility functions for the Saitek X52 MFD & LED driver library.
This file contains the type and function prototypes for the Saitek X52 driver library utility functions. These functions simplify some of the data handling for MFD & LED control, but they are not required.