Functions | |
int | fwCcpc_LBUSWrite (string pCCPC, int pAddress, int pType, int pSize, dyn_char pData, dyn_char pMask=makeDynChar(), bool pWaitFlag=true) |
int | fwCcpc_LBUSRead (string pCCPC, int pAddress, int pType, int pSize, dyn_char &pData) |
int | fwCcpc_LBUSWriteRead (string pCCPC, int pAddress, int pType, int pSize, dyn_char pDataWrite, dyn_char pMask, dyn_char &pDataRead) |
int fwCcpc_LBUSRead | ( | string | pCCPC, | |
int | pAddress, | |||
int | pType, | |||
int | pSize, | |||
dyn_char & | pData | |||
) |
Read data from the specified LBUS register.
[in] | pCCPC | name of the CCPC. |
[in] | pAddress | address. |
[in] | pType | type of register. These types are represented by the constants FWCCPC_LBUS_BITS_8, FWCCPC_LBUS_BITS_16 and FWCCPC_LBUS_BITS_32. |
[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_LBUSRead("pclbcecs03", 0x1000020, FWCCPC_LBUS_BITS_32, 1, myData) == 0) // read 1 word of 32 bits from LBUS DebugTN(fwCcpc_convertByteToHex(myData)); else DebugTN("Error found!"); (...)
int fwCcpc_LBUSWrite | ( | string | pCCPC, | |
int | pAddress, | |||
int | pType, | |||
int | pSize, | |||
dyn_char | pData, | |||
dyn_char | pMask = makeDynChar() , |
|||
bool | pWaitFlag = true | |||
) |
Write data into the specified LBUS register.
[in] | pCCPC | name of the CCPC. |
[in] | pAddress | address. |
[in] | pType | type of register. These types are represented by the constants FWCCPC_LBUS_BITS_8, FWCCPC_LBUS_BITS_16 and FWCCPC_LBUS_BITS_32. |
[in] | pSize | size (in words) of the LBUS register. |
[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_LBUSWrite("pclbcecs03", 0x1000020, FWCCPC_LBUS_BITS_32, 1,fwCcpc_convertHexToByte("feedbabe")) == 0) // writes 1 word of 4 bytes (=32 bit bus) (...) else DebugTN("Error found!"); (...)
int fwCcpc_LBUSWriteRead | ( | string | pCCPC, | |
int | pAddress, | |||
int | pType, | |||
int | pSize, | |||
dyn_char | pDataWrite, | |||
dyn_char | pMask, | |||
dyn_char & | pDataRead | |||
) |
Write and, then, read data from the specified LBUS 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] | pType | type of register. These types are represented by the constants FWCCPC_LBUS_BITS_8, FWCCPC_LBUS_BITS_16 and FWCCPC_LBUS_BITS_32. |
[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_LBUSWriteRead("pclbcecs03", 0x1000020, FWCCPC_LBUS_BITS_32, 1, fwCcpc_convertHexToByte("feedbabe"), makeDynChar(), myData) == 0) // writes 1 word of 32 bits and then DebugTN(fwCcpc_convertHexToByte(myData)); // reads back data from the LBUS else DebugTN("Error found!"); (...)