Example of using function computeCRC16 to perform a CRC-16 checksum generation on a given data buffer.
Example of using function computeCRC16 to perform a CRC-16 checksum generation on a given data buffer.
#include <stdint.h>
#include <stddef.h>
#include <mcuxClCore_Examples.h>
static const uint8_t data[] = {
0x2Fu, 0xE4u, 0x26u, 0xB1u, 0x20u, 0x75u, 0x39u, 0x5Eu,
0x18u, 0x20u, 0xD6u, 0xA5u, 0xBEu, 0xEEu, 0x92u, 0xF2u,
0xB3u, 0xD7u, 0x9Eu, 0x8Bu, 0x46u
};
#define NCP_CL_CRC_REF_RESULT 0x6aDBu
MCUXCLEXAMPLE_FUNCTION(mcuxClCrc_Crc16_example)
{
data,
sizeof(data))
);
{
return MCUXCLEXAMPLE_STATUS_ERROR;
}
return MCUXCLEXAMPLE_STATUS_OK;
}
Definition of function identifiers for the flow protection mechanism.
Top-level include file for the mcuxClCrc component.
Provides the API for the CSSL flow protection mechanism.
uint16_t mcuxClCrc_computeCRC16(const uint8_t *pBytes, uint32_t length)
Compute a 16-bit CRC checksum.
#define MCUX_CSSL_FP_FUNCTION_CALL_BEGIN(...)
Call a flow protected function and check the protection token.
Definition mcuxCsslFlowProtection.h:623
#define MCUX_CSSL_FP_FUNCTION_CALLED(...)
Expectation of a called function.
Definition mcuxCsslFlowProtection.h:777
#define MCUX_CSSL_FP_FUNCTION_CALL_END(...)
End a function call section started by MCUX_CSSL_FP_FUNCTION_CALL_BEGIN.
Definition mcuxCsslFlowProtection.h:658