Xil_ConvertStringToHexLE - Xil_ConvertStringToHexLE - 2026.1 English - UG643

Standalone Library Documentation: BSP and Libraries Document Collection (UG643)

Document ID
UG643
Release Date
2026-06-23
Version
2026.1 English

Returns length of the input string

Converts the string into the equivalent Hex buffer. Ex: "abc123" -> {0x23, 0xc1, 0xab}

Note:

Prototype

u32 Xil_ConvertStringToHexLE(const char *Str, u8 *Buf, u32 Len);

Parameters

The following table lists the Xil_ConvertStringToHexLE function arguments.

Table 1. Xil_ConvertStringToHexLE Arguments
Type Member Description
const char * Str - Input String to be converted to hex number in little endian format. Valid characters of input strin are between 0-9, a-f and A-F
u8 * Buf - Pointer to memory location where converted hex numbers are to be stored.
u32 Len - Expected number of output bits

Returns

XST_SUCCESS - Input string is converted to hex number(s) XST_FAILURE - Invalid input character detected in input string