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
BTL_CRC16_START 0xFFFFU
CRC16 start value.
Function Documentation#
btl_crc16#
uint16_t btl_crc16 (const uint8_t newByte, uint16_t prevResult)
Calculate CRC16 on input.
Parameters
N/A | newByte | Byte to append to CRC16 calculation |
N/A | prevResult | 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/A | buffer | Buffer containing bytes to append to CRC16 calculation |
N/A | length | Size of the buffer in bytes |
N/A | prevResult | 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