#include <revolution/os.h>
u16 OSCalcCRC16( const void* datap, u32 size );
u32 OSCalcCRC32( const void* datap, u32 size );
| datap | Pointer to the input data. |
| size | Size of the input data. |
Various CRC values.
This function calculates various CRC values.
Any size and alignment position can be used for the input data.
The calculation method used by each function is described below.
| Functions | Number of bits | Generated polynomials | Initial Value | +Result complement process |
| OSCalcCRC16 | 16-bit | x^16 + x^15 + x^2 + x^0 | 0x0000 | None. |
| OSCalcCRC32 | 32-bit | x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x^1+x^0 | 0xFFFFFFFF | 1's complement |
2008/05/19 Initial version.
CONFIDENTIAL