Tizen RT Libs&Environment  v1.0 D5

Provides APIs for Cyclic Redundancy Check. More...

Collaboration diagram for CRC:

Files

file  crc8.h
 Crc8 APIs.
 
file  crc16.h
 Crc16 APIs.
 
file  crc32.h
 Crc32 APIs.
 

Macros

#define EXTERN   extern
 
#define EXTERN   extern
 
#define EXTERN   extern
 

Functions

uint8_t crc8part (FAR const uint8_t *src, size_t len, uint8_t crc8val)
 Continue CRC calculation on a part of the buffer. More...
 
uint8_t crc8 (FAR const uint8_t *src, size_t len)
 Return an 8-bit CRC of the contents of the 'src' buffer, length 'len' using the polynomial x^8+x^6+x^3+x^2+1 (Koopman, et al. "0xA6" poly). More...
 
uint16_t crc16part (FAR const uint8_t *src, size_t len, uint16_t crc16val)
 Continue CRC calculation on a part of the buffer. More...
 
uint16_t crc16 (FAR const uint8_t *src, size_t len)
 Return a 16-bit CRC of the contents of the 'src' buffer, length 'len'. More...
 
uint32_t crc32part (FAR const uint8_t *src, size_t len, uint32_t crc32val)
 Continue CRC calculation on a part of the buffer. More...
 
uint32_t crc32 (FAR const uint8_t *src, size_t len)
 Return a 32-bit CRC of the contents of the 'src' buffer, length 'len'. More...
 

Detailed Description

Provides APIs for Cyclic Redundancy Check.

Macro Definition Documentation

#define EXTERN   extern

Definition at line 77 of file crc16.h.

#define EXTERN   extern

Definition at line 77 of file crc32.h.

#define EXTERN   extern

Definition at line 81 of file crc8.h.

Function Documentation

uint16_t crc16 ( FAR const uint8_t *  src,
size_t  len 
)

Return a 16-bit CRC of the contents of the 'src' buffer, length 'len'.

Parameters
[in]sourcenumber for crc16
[in]lengthfor calculation
Returns
On success, calculated 16-bit CRC is returned.
Since
Tizen RT v1.0
uint16_t crc16part ( FAR const uint8_t *  src,
size_t  len,
uint16_t  crc16val 
)

Continue CRC calculation on a part of the buffer.

Parameters
[in]sourcenumber for crc16
[in]lengthfor calculation
[in]valuefor calculation
Returns
On success, calculated 16-bit CRC is returned.
Since
Tizen RT v1.0
uint32_t crc32 ( FAR const uint8_t *  src,
size_t  len 
)

Return a 32-bit CRC of the contents of the 'src' buffer, length 'len'.

Parameters
[in]sourcenumber for crc32
[in]lengthfor calculation
Returns
On success, calculated 16-bit CRC is returned.
Since
Tizen RT v1.0
uint32_t crc32part ( FAR const uint8_t *  src,
size_t  len,
uint32_t  crc32val 
)

Continue CRC calculation on a part of the buffer.

Parameters
[in]sourcenumber for crc32
[in]lengthfor calculation
[in]valuefor calculation
Returns
On success, calculated 32-bit CRC is returned.
Since
Tizen RT v1.0
uint8_t crc8 ( FAR const uint8_t *  src,
size_t  len 
)

Return an 8-bit CRC of the contents of the 'src' buffer, length 'len' using the polynomial x^8+x^6+x^3+x^2+1 (Koopman, et al. "0xA6" poly).

Parameters
[in]sourcenumber for crc8
[in]lengthfor calculation
Returns
On success, calculated 8-bit CRC is returned.
Since
Tizen RT v1.0
uint8_t crc8part ( FAR const uint8_t *  src,
size_t  len,
uint8_t  crc8val 
)

Continue CRC calculation on a part of the buffer.

Parameters
[in]sourcenumber for crc8
[in]lengthfor calculation
[in]valuefor calculation
Returns
On success, calculated 8-bit CRC is returned.
Since
Tizen RT v1.0