Utils API
The Utils API provides utility functions for text processing, display value management, hardware pin control, and system operations.Display text management
UtilsAbstractDisplayValue_t
Structure for managing scrolling text on displays.Text buffer to display
Current display position index
Length of text
Active status: 0 = inactive, 1 = active
Display timeout in iterations (-1 = indefinite)
UtilsDisplayValueInit
Initializes a display value structure.Text string to display
Display timeout in iterations
Initialized display value structure
String functions
UtilsStricmp
Case-insensitive string comparison.0 if strings match (case-insensitive), non-zero otherwise
UtilsStrncpy
Safe string copy with null termination.Destination buffer
Source string
Maximum characters to copy
UtilsNormalizeText
Normalizes text by removing extended characters and truncating.Output buffer
Input text to normalize
Maximum output length
This function transliterates Unicode characters to ASCII equivalents for display compatibility.
UtilsRemoveSubstring
Removes first occurrence of substring from a string.UtilsCharIndex
Finds first occurrence of character in string.Index of character, or -1 if not found
Conversion functions
UtilsStrToHex
Converts hex string to byte value.UtilsStrToInt
Converts string to integer.UtilsConvertCmToIn
Converts centimeters to inches.Unicode and text encoding
UtilsGetUnicodeByteLength
Returns byte length of a UTF-8 character.Number of bytes in UTF-8 character (1-4)
UtilsTransliterateUnicodeToASCII
Transliterates Unicode character to ASCII equivalent.Unicode codepoint (e.g., 0xC3A4 for ‘ä’)
ASCII transliteration or empty string
- Latin extended (À-ÿ) → ASCII equivalents
- Cyrillic (А-я) → Romanized equivalents
- Special symbols (–, ’, ’, …)
UtilsTransliterateExtendedASCIIToASCII
Transliterates extended ASCII to standard ASCII.UtilsConvertCyrillicUnicodeToExtendedASCII
Converts Cyrillic Unicode to extended ASCII.Hardware control
UtilsSetPinMode
Configures pin as input or output.Pin number
0 = output, 1 = input
UtilsSetRPORMode
Configures remappable peripheral pin.RPOR pin number (0-31)
Peripheral function code
System functions
UtilsGetBoardVersion
Returns hardware board version.Board version (1 or 2)
UtilsReset
Performs software reset.UtilsGetMinByte
Finds minimum byte value in array.Bit manipulation macros
Constants
See also
- Locale API - Multi-language text support
- UI API - Display interface functions