nn::util::Crc8::Calculate Member Function

Syntax

static u8 Calculate(
const void * input,
size_t length,
u8 context = CRC8_STANDARD_INIT
);

Arguments

Name Description
in input Pointer to the input data.
in length Size of the input data.
in context Initial value of the context. Normally the default value is used.

Return Values

The calculation result.

Description

Calls all the associated functions needed to calculate CRC-8, and gets the calculation result.

Internally, calls the following functions together: nn::util::Crc8::InitializeContext, nn::util::Crc8::Update, and nn::util::Crc8::GetHash. This function cannot be used if you need to split up the data and call nn::util::Crc8::Update multiple times. Any size and alignment position can be used for the input data.

Revision History

2010/10/15
Initial version.

CONFIDENTIAL