Error with CRC_GetBlockCRC function

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Error with CRC_GetBlockCRC function

694 次查看
nadiajarray
Contributor II

I'm trying to use the CRC component to check an SPI communication

but by using the function CRC1_GetBlockCRC this way

CRC1_GetBlockCRC(CRC1_TDeviceData, &RVG_SPIReadBuffer, RVG_SPIReadBufferSize*sizeof(uint8_t), &ResultRead);

I'm getting the error "expected expression before'CRC1_TDeviceData'

Can someone provide an explanation for that ?

Thx

标签 (1)
标记 (1)
1 回复

579 次查看
TICS_Fiona
NXP Employee
NXP Employee

Hello Nadia

How did you define the type for  CRC1_TDeviceData?

Below is the typical way for initializing the device data structure and call API function:

LDD_TDeviceData *DeviceData=NULL;

………………………

DeviceData = CRC1_Init(NULL);

………………………

    CRC1_GetBlockCRC(DeviceData, (LDD_TData*) InputStream, BLOCK_SIZE*sizeof(uint32_t), &Result);

Hope this helps! If not, could you please attach a simple example project to help me reproduce the error? Thanks!

Best Regards

Fiona Kuang

TIC - Technical Information Center

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Mark Correct button. Thank you!

-----------------------------------------------------------------------------------------------------------------------