libfru 3.1.0.g6643c5c
FRU Manupulation Library
Loading...
Searching...
No Matches
Utilities

Various utility definitions, not directly related to FRU. More...

Macros

#define FRU_ARRAY_SZ(a)
 A convenience macro to get the size of an array in elements.
 

Functions

int16_t fru_hex2byte (const char *hex)
 Convert 2 first bytes of hex string into a binary byte.
 

Detailed Description

Various utility definitions, not directly related to FRU.

Macro Definition Documentation

◆ FRU_ARRAY_SZ

#define FRU_ARRAY_SZ (   a)

A convenience macro to get the size of an array in elements.

Function Documentation

◆ fru_hex2byte()

int16_t fru_hex2byte ( const char *  hex)

Convert 2 first bytes of hex string into a binary byte.

This is just a convenience utility function, not directly related to FRU.

Returns
A byte converted from hex string (in the lower 8 bits) or a -1 for an error.
Return values
-1An error occured. See fru_errno