Xil_ConvertCharToNibble - Xil_ConvertCharToNibble - 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

Convert input hex string to array of 32-bits integers

Converts the char into the equivalent nibble. Ex: 'a' -> 0xa, 'A' -> 0xa, '9'->0x9

Note: None.

Prototype

u32 Xil_ConvertCharToNibble(u8 InChar, u8 *Num);

Parameters

The following table lists the Xil_ConvertCharToNibble function arguments.

Table 1. Xil_ConvertCharToNibble Arguments
Type Member Description
u8 InChar - Input character to be converted to nibble. Valid characters are between 0-9, a-f, A-F
u8 * Num - Memory location where nibble is to be stored

Returns

XST_SUCCESS - Character converted to nibble XST_FAILURE - Invalid input character