void *co_memory_ptr(co_memory mem); 

Header File



This 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.


The arguments for co_memory_ptr are as follows:

co_memory mem

A memory pointer as passed to the process on the process argument list.

Return Value

A pointer to the memory buffer. Returns NULL if the mem argument is NULL, in which case co_errno is set to CO_ENULL_PTR.


This 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.

    Practical FPGA Programming in C
    Practical FPGA Programming in C
    ISBN: 0131543180
    EAN: 2147483647
    Year: 2005
    Pages: 208

    Similar book on Amazon © 2008-2017.
    If you may any questions please contact us: