• Calculate LIN frame checksum

    Parameters

    • data: Buffer

      Data bytes to calculate checksum for

    • checksumType: LinChecksumType

      Type of checksum (CLASSIC for LIN 1.x or ENHANCED for LIN 2.x)

    • Optionalpid: number

      Protected ID, required for enhanced checksum calculation

    Returns number

    Calculated checksum byte