您好!
是否有办法以编程方式获取代码的校验和?
我正在使用 LabView、想要访问所选图像或至少显示在接口上的图像的校验和。
我看到过一个函数"MSPGang_MSPGA" Get_Code_Info、但我无法使用它。
提前感谢您的帮助
此致
大卫
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
此外、我不运行 DLL 演示、它应该可以由 Microsoft Visual Studio 打开。
您可以使用一些代码来生成 CRC、如下所示
#define CRC32_Poly 0xEDB88320
uint32_t 软件 CRC (const uint8_t * data、uint8_t length)
{
uint32_t ii、jj、byte、crc、mask;
;
CRC = 0xFFFFFFFF;
对于(ii = 0;ii <长度;ii++){
字节= data[ii];
CRC = CRC ^字节;
对于(jj = 0;jj < 8;jjjj++){
掩码=-(CRC & 1);
CRC =(CRC >> 1)^(CRC32_Poly_MASK);
}
}
返回 CRC;
}