...
lib_mem.h
Prototypes
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
MEM_VAL_COPY_08(addr_dest, addr_src);
MEM_VAL_COPY_16(addr_dest, addr_src);
MEM_VAL_COPY_32(addr_dest, addr_src);
MEM_VAL_COPY(addr_dest, addr_src, val_size);
|
Arguments
addr_dest
Lowest CPU memory address to copy source address’s data value.
...
MEM_VAL_COPY_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 | ||
---|---|---|
Language | C++ | CaptionText | CAPTION
| ||
CPU_INT16U *pmem; CPU_INT16U *pval; pmem = &SomeAddr; /* Any CPU address */ pval = &SomeVal; /* Any CPU address */ MEM_VAL_COPY_16(pmem, pval); |