HFZXGETX – Get data area hexadecimal character field value

Format

#include "hfzxhfmt.h"

#define HFZXGETX(pSrc) \
        (HFZXGETX)(pSrc, sizeof(pSrc))
int     (HFZXGETX)(char *pSrc, int src_len);

General description

HFZXGETX() is used to convert a data area character field that holds hexadecimal characters (0-9 or A-F) to an "int" value.

HFZXGETX() is a macro, which calls a function by the same name. The advantage of using the macro is that only a single argument is required.

Returned value

If successful, HFZXGETX() returns the converted signed "int" value, represented in the string. If unsuccessful, it returns an undefined value.

Example

#include "hfzxhfmt.h"

int pgm_len;
UFM ufm;
…
pgm_len = HFZXGETX(ufm.PROGRAM_LENGTH);