Functions | |
int | fwCcpc_GBEWrite (string pCCPC, int pAddress, int pSize, dyn_char pData, dyn_char pMask=makeDynChar(), bool pWaitFlag=true) |
int | fwCcpc_GBERead (string pCCPC, int pAddress, int pSize, dyn_char &pData) |
int | fwCcpc_GBEWriteRead (string pCCPC, int pAddress, int pSize, dyn_char pDataWrite, dyn_char pMask, dyn_char &pDataRead) |
int fwCcpc_GBERead | ( | string | pCCPC, | |
int | pAddress, | |||
int | pSize, | |||
dyn_char & | pData | |||
) |
Read data from the specified GBE register.
[in] | pCCPC | name of the CCPC. |
[in] | pAddress | address. |
[in] | pSize | size (in words) of the data to be read. |
[out] | pData | data read. |
> 0 error found (related with CCPC Server).
= -1 error found (related with PVSS).
(...) dyn_char myData; if (fwCcpc_GBERead("pclbcecs03", 0x600, 1, myData) == 0) // read 1 word from GBE DebugTN(fwCcpc_convertByteToHex(myData); else DebugTN("Error found!"); (...)
int fwCcpc_GBEWrite | ( | string | pCCPC, | |
int | pAddress, | |||
int | pSize, | |||
dyn_char | pData, | |||
dyn_char | pMask = makeDynChar() , |
|||
bool | pWaitFlag = true | |||
) |
Write data into the specified GBE register.
[in] | pCCPC | name of the CCPC. |
[in] | pAddress | address. |
[in] | pSize | size (in words) of the data to be written. |
[in] | pData | data to be written. Note: If the data is greater than the specified size, then the data will be truncated to that size. If the data is shorter than the specified size, than it will be filled up with leading zeroes. |
[in] | pMask | mask that is going to be used for the writing. Note: if the mask is empty, then no masking operation will be performed. |
[in] | pWaitFlag | if true, the function will wait for the return value, otherwise (false) the function will not wait for the return value (in this case, the return value will be always equal to 0 or -1). Note: this parameter is optional (if not specified, the default will be true). |
> 0 error found (related with CCPC Server).
= -1 error found (related with PVSS).
(...) if (fwCcpc_GBEWrite("pclbcecs03", 0x600, 2, fwCcpc_convertHexToByte("feedbabe"+"deaddead"), makeDynChar(), true) == 0) // write 2 words to GBE (...) else DebugTN("Error found!"); (...)
int fwCcpc_GBEWriteRead | ( | string | pCCPC, | |
int | pAddress, | |||
int | pSize, | |||
dyn_char | pDataWrite, | |||
dyn_char | pMask, | |||
dyn_char & | pDataRead | |||
) |
Write and, then, read data from the specified GBE register. This function should be used whenever possible, since it will optimize speed. Note: if the write operation fails, then the read operation will not be performed.
[in] | pCCPC | name of the CCPC. |
[in] | pAddress | address. |
[in] | pSize | size (in words) of the data to be written. |
[in] | pDataWrite | data to be written. Note: If the data is greater than the specified size, then the data will be truncated to that size. If the data is shorter than the specified size, than it will be filled up with leading zeroes. |
[in] | pMask | mask that is going to be used for the writing. Note: if the mask is empty, then no masking operation will be performed. |
[out] | pDataRead | data read. |
> 0 error found (related with CCPC Server).
= -1 error found (related with PVSS).
(...) dyn_char myData; if (fwCcpc_GBEWriteRead("pclbcecs03", 0x600, 2, fwCcpc_convertHexToByte("feedbabe"+"deaddead"), makeDynChar(), myData) == 0) // write 2 words and then DebugTN(fwCcpc_convertByteToHex(myData); // read back from same address else DebugTN("Error found!"); (...)