void *co_memory_ptr(co_memory mem); Header Fileco.h DescriptionThis function returns a pointer to the data buffer of a shared memory. This function may be called from within a software process to obtain the pointer to a data buffer (memory location), allowing that memory to be directly accessed. ArgumentsThe arguments for co_memory_ptr are as follows:
Return ValueA pointer to the memory buffer. Returns NULL if the mem argument is NULL, in which case co_errno is set to CO_ENULL_PTR. NotesThis function is normally used in software processes to provide a direct means of accessing memory contents for reading and writing. In hardware processes, co_memory_ptr is not supported; instead, use the functions co_memory_readblock and co_memory_writeblock. |