CO_REGISTER_READ


 co_error co_register_read(co_register reg,                           void *buffer,                           size_t buffersize); 

Header File

co.h

Description

This function reads a data value from a register object and copies the value to a local memory. This function must be called from within a process run function.

Arguments

The arguments for co_register_read are as follows:

co_register reg

A pointer to a register object as passed on the process argument list.

void *buffer

A pointer to the destination memory. (The destination is typically an integer variable.)

size_t buffersize

The number of bytes to transfer in the read operation.


Return Value

If the operation is successful, the function returns co_err_none and sets co_errno to CO_ENOERROR. In case of error, it returns co_err_invalid_arg and sets the co_errno variable accordingly; co_errno is set to CO_ENULL_PTR if the reg argument is NULL or to CO_EINVALID_REGISTER_WIDTH if the register is smaller than 32 bits.



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

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net