Microchip® Advanced Software Framework

pcrc.h File Reference

PLC PRIME CRC calculation service.

Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.

Macros

#define PCRC_CRC_INVALID   0xFFFFFFFF
 
#define PCRC_HT_BEACON   2
 
#define PCRC_HT_GENERIC   0
 
#define PCRC_HT_PROMOTION   1
 
#define PCRC_HT_USI   3
 
#define PCRC_PROMOTION_CRC_LENGTH   13
 

Enumerations

enum  PCRC_CRC_types {
  PCRC_CRC_TYPE_8 = 0,
  PCRC_CRC_TYPE_16 = 1,
  PCRC_CRC_TYPE_24 = 2,
  PCRC_CRC_TYPE_32 = 3
}
 

Functions

uint32_t pcrc_calculate_prime_crc (uint8_t *puc_buf, uint32_t ul_len, uint8_t uc_header_type, uint8_t uc_crc_type)
 Calculates the CRC of the input buffer according to the PRIME spec. More...
 
void pcrc_configure_sna (uint8_t *puc_sna)
 Through this function, the SNA is configured for the PCRC service. More...