Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How is the USB data CRC value calculated?

calculated CRC Data USB value
0
Posted

How is the USB data CRC value calculated?

0

Here are two examples. Example 1, from Ron Hemphill. Example 2, from Barry Twycross: This is not suitable for use as production code; it is very inefficient: UInt16 CRC16(void *buffer, UInt32 count) { UInt8 *bp; UInt32 poly, a, b, newBit, lostBit; int i; poly = 0x8005; a = 0xffff; bp = buffer; while(count–) { b = *(bp++); for(i = 0; i<8; i++) { a <<= 1; newBit = (b & 1); b >>= 1; lostBit = a >> 16; if(newBit !

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123