SDL standard library

Dependents:   H261_encoder

Embed: (wiki syntax)

« Back to documentation index

SDL_test_crc32.h File Reference

SDL_test_crc32.h File Reference

Include file for SDL test framework. More...

Go to the source code of this file.

Data Structures

struct  SDLTest_Crc32Context
 Data structure for CRC32 (checksum) computation. More...

Functions

int SDLTest_Crc32Init (SDLTest_Crc32Context *crcContext)
 /brief Initialize the CRC context
int SDLTest_crc32Calc (SDLTest_Crc32Context *crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32)
 /brief calculate a crc32 from a data block
int SDLTest_Crc32Done (SDLTest_Crc32Context *crcContext)
 /brief clean up CRC context

Detailed Description

Include file for SDL test framework.

This code is a part of the SDL2_test library, not the main SDL library.

Definition in file SDL_test_crc32.h.


Function Documentation

int SDLTest_crc32Calc ( SDLTest_Crc32Context crcContext,
CrcUint8 *  inBuf,
CrcUint32  inLen,
CrcUint32 *  crc32 
)

/brief calculate a crc32 from a data block

/param crcContext pointer to context variable /param inBuf input buffer to checksum /param inLen length of input buffer /param crc32 pointer to Uint32 to store the final CRC into

/returns 0 for OK, -1 on error

int SDLTest_Crc32Done ( SDLTest_Crc32Context crcContext )

/brief clean up CRC context

/param crcContext pointer to context variable

/returns 0 for OK, -1 on error

int SDLTest_Crc32Init ( SDLTest_Crc32Context crcContext )

/brief Initialize the CRC context

Note: The function initializes the crc table required for all crc calculations.

/param crcContext pointer to context variable

/returns 0 for OK, -1 on error