...
lib_mem.h
Prototypes
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
MEM_VAL_GET_INT08U_BIG(addr);
MEM_VAL_GET_INT16U_BIG(addr);
MEM_VAL_GET_INT32U_BIG(addr);
MEM_VAL_GET_INT08U_LITTLE(addr);
MEM_VAL_GET_INT16U_LITTLE(addr);
MEM_VAL_GET_INT32U_LITTLE(addr);
MEM_VAL_GET_INT08U(addr);
MEM_VAL_GET_INT16U(addr);
MEM_VAL_GET_INT32U(addr);
|
Arguments
addr
Lowest CPU memory address of the data value to decode.
...
MEM_VAL_COPY_GET_xxx()
macros (see section 4-2-6) are more efficient than MEM_VAL_GET_xxx()
macros and are also fully independent of CPU data-word-alignment and should be used whenever possible.
MEM_VAL_GET_xxx()
macros are not atomic operations and must not be used on any non-static (i.e., volatile) variables, registers, hardware, etc.; without the caller of the macros providing some form of additional protection (e.g. mutual exclusion).
Example Usage
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
CPU_INT08U *pval; CPU_INT16U val; pval = &SomeAddr; /* Any CPU address */ val = MEM_VAL_GET_INT16U(pval); |