CRC16#

CRC16 functionality for the bootloader.

Functions#

uint16_t
btl_crc16(const uint8_t newByte, uint16_t prevResult)

Calculate CRC16 on input.

uint16_t
btl_crc16Stream(const uint8_t *buffer, size_t length, uint16_t prevResult)

Calculate CRC16 on input stream.

Macros#

#define

CRC16 start value.

Function Documentation#

btl_crc16#

uint16_t btl_crc16 (const uint8_t newByte, uint16_t prevResult)

Calculate CRC16 on input.

Parameters
N/AnewByte

Byte to append to CRC16 calculation

N/AprevResult

Previous output from CRC algorithm. BTL_CRC16_START when starting a new calculation.

Returns

  • Result of the CRC16 operation


Definition at line 45 of file platform/bootloader/security/btl_crc16.h

btl_crc16Stream#

uint16_t btl_crc16Stream (const uint8_t * buffer, size_t length, uint16_t prevResult)

Calculate CRC16 on input stream.

Parameters
N/Abuffer

Buffer containing bytes to append to CRC16 calculation

N/Alength

Size of the buffer in bytes

N/AprevResult

Previous output from CRC algorithm. BTL_CRC16_START when starting a new calculation.

Returns

  • Result of the CRC16 operation


Definition at line 56 of file platform/bootloader/security/btl_crc16.h

Macro Definition Documentation#

BTL_CRC16_START#

#define BTL_CRC16_START
Value:
0xFFFFU

CRC16 start value.


Definition at line 35 of file platform/bootloader/security/btl_crc16.h