Typedefs | Functions
sbgCrc.h File Reference

This file provides CRC-32 and CRC-16 methods. More...

#include <sbgCommon.h>
Include dependency graph for sbgCrc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef uint16 SbgCrc16
 
typedef uint32 SbgCrc32
 

Functions

uint16 sbgCrc16Compute (const void *pData, size_t dataSize)
 
SBG_INLINE uint16 sbgCrc16Get (const SbgCrc16 *pInstance)
 
void sbgCrc16Initialize (SbgCrc16 *pInstance)
 
void sbgCrc16Update (SbgCrc16 *pInstance, const void *pData, size_t dataSize)
 
uint32 sbgCrc32Compute (const void *pData, size_t dataSize)
 
SBG_INLINE uint32 sbgCrc32Get (const SbgCrc32 *pInstance)
 
void sbgCrc32Initialize (SbgCrc32 *pInstance)
 
void sbgCrc32Update (SbgCrc32 *pInstance, const void *pData, size_t dataSize)
 

Detailed Description

This file provides CRC-32 and CRC-16 methods.

Author
SBG Systems (Raphael Siryani)
Date
15 January 2013

Copyright Notice

Copyright (C) 2007-2013, SBG Systems SAS. All rights reserved.

This source code is intended for use only by SBG Systems SAS and those that have explicit written permission to use it from SBG Systems SAS.

THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.

Definition in file sbgCrc.h.

Typedef Documentation

typedef uint16 SbgCrc16

Definition at line 41 of file sbgCrc.h.

typedef uint32 SbgCrc32

< Type used to compute a 32 bit Ethernet CRC. Type used to compute a 16 bit CRC.

Definition at line 38 of file sbgCrc.h.

Function Documentation

uint16 sbgCrc16Compute ( const void *  pData,
size_t  dataSize 
)

Compute a 32 Bit CRC using an the polynome 0x8408.

Parameters
[in]pDataRead only pointer on the data buffer to compute CRC on.
[in]dataSizeData size in bytes of the buffer.
Returns
The computed CRC.

Definition at line 243 of file sbgCrc.c.

SBG_INLINE uint16 sbgCrc16Get ( const SbgCrc16 pInstance)

Returns the computed 32 bit CRC value.

Parameters
[in]pInstanceRead only pointer on a valid Crc16 object.
Returns
The computed CRC.

Definition at line 104 of file sbgCrc.h.

void sbgCrc16Initialize ( SbgCrc16 pInstance)

Initialize the 16 bit CRC computation system.

Parameters
[in]pInstancePointer on an allocated but non initialized Crc16 object.

Definition at line 196 of file sbgCrc.c.

void sbgCrc16Update ( SbgCrc16 pInstance,
const void *  pData,
size_t  dataSize 
)

Compute a 16 bit CRC using an the polynome 0x8408.

Parameters
[in]pInstanceRead only pointer on a valid Crc16 object.
[in]pDataRead only pointer on the data buffer to compute CRC on.
[in]dataSizeData size in bytes of the buffer.

Definition at line 212 of file sbgCrc.c.

uint32 sbgCrc32Compute ( const void *  pData,
size_t  dataSize 
)

Compute a 32 Bit CRC using an Ethernet polynome. Warning: the buffer size should be at least 4 bytes long.

Parameters
[in]pDataRead only pointer on the data buffer to compute CRC on.
[in]dataSizeData size in bytes of the buffer, has to be greater or equals to 4.
Returns
The computed CRC.

Definition at line 168 of file sbgCrc.c.

SBG_INLINE uint32 sbgCrc32Get ( const SbgCrc32 pInstance)

Returns the computed 32 bit CRC value.

Parameters
[in]pInstanceRead only pointer on a valid Crc32 object.
Returns
The computed CRC.

Definition at line 67 of file sbgCrc.h.

void sbgCrc32Initialize ( SbgCrc32 pInstance)

Initialize the 32 bit CRC computation system.

Parameters
[in]pInstancePointer on an allocated but non initialized Crc32 object.

Definition at line 91 of file sbgCrc.c.

void sbgCrc32Update ( SbgCrc32 pInstance,
const void *  pData,
size_t  dataSize 
)

Compute a 32 bit CRC using an Ethernet polynome. Warning: the buffer size should be at least 4 bytes long.

Parameters
[in]pInstanceRead only pointer on a valid Crc32 object.
[in]pDataRead only pointer on the data buffer to compute CRC on.
[in]dataSizeData size in bytes of the buffer, has to be greater or equals to 4.

Definition at line 108 of file sbgCrc.c.



sbg_driver
Author(s):
autogenerated on Sun Jan 27 2019 03:42:20