Mem_Set()
Fills a memory buffer with a specific value. In other words, set all octets in the memory buffer to the specific value.
Files
lib_mem.h/lib_mem.c
Prototype
void Mem_Set (void *pmem, CPU_INT08U data_val, CPU_SIZE_T size);
Arguments
pmem
Pointer to the memory buffer to be set with a specific value.
data_val
Data value to set.
size
Number of memory buffer octets to set.
Returned Value
None.
Required Configuration
None.
Notes / Warnings
Zero-sized sets allowed.
Example Usage
CPU_CHAR AppBuf[10]; Mem_Set((void *)&AppBuf[0], (CPU_INT08U) 0x64, (CPU_SIZE_T) sizeof(AppBuf));