crc16_ccitt_bitwise

CRC16-CCITT Bitwise Implementation Library

Author Matthew Schinkel
Adapted-by
Compiler >=2.4r9

Description

CRC16-CCITT implementation using optimized bitwise algorithm.
Provides incremental and one-shot calculation over bytes using direct bit manipulation.
This is the reference implementation for CRC16-CCITT with polynomial 0x1021.


Dependencies

No dependency found



Summary

Global variables/contants

Procedures

Functions


API details

Global variables/contants

Procedures

  • crc16_calculate_bytes(byte in data)

    Calculate CRC16 for a single byte using bitwise algorithm
    Parameters: data - single byte to process
    Updates internal CRC state with new data byte using bitwise algorithm
    
    

  • crc16_start(word in expected_bytes)

    Initialize CRC16 calculation
    Parameters: expected_bytes - expected number of bytes to process
    Initializes CRC calculation state and sets up for incremental processing
    
    

  • crc16_verify(word in calculated, word in expected)

    Verify CRC16 result
    Parameters: calculated - computed CRC value, expected - expected CRC value
    Compares calculated CRC against expected value for validation
    
    

Functions


Related samples

Here are the list of samples which use this library:

18f67j5018f67j50_crc16_ccitt_bitwise.jal