35 #ifndef P33C_CRC_SFR_ABSTRACTION_H 36 #define P33C_CRC_SFR_ABSTRACTION_H 44 #include "p33c_macros.h" 47 #ifndef P33C_CRC_MODULE_s 63 volatile struct tagCRCCONLBITS
bits;
67 volatile struct tagCRCCONHBITS
bits;
68 volatile uint16_t
value;
106 } __attribute__((packed));
110 #define CRC16_PVIZ_REV_POLYNOMIAL ((uint16_t)0xA001) // Standard Polynomial 0x8005 111 #define CRC16_PVIZ_SEED_VALUE ((uint16_t)0x0000) // non-direct of 0x0000 114 #define CRC16_CCITT_REV_POLYNOMIAL ((uint16_t)0x8408) // Standard Polynomial 115 #define CRC16_CCITT_SEED_VALUE ((uint16_t)0x0000) // non-direct of 0x0000 117 enum CRC_POLYNOMIAL_e {
118 CRC8_STANDARD_POLYNOMIAL = 0xD5,
119 CRC8_AUTOSAR_POLYNOMIAL = 0x2F,
120 CRC8_BLUETOOTH_POLYNOMIAL = 0xA7,
121 CRC8_CCITT_POLYNOMIAL = 0x07,
122 CRC8_DALLAS_POLYNOMIAL = 0x31,
123 CRC8_DARC_POLYNOMIAL = 0x39,
124 CRC8_GSMB_POLYNOMIAL = 0x49,
125 CRC8_SAEJ1850_POLYNOMIAL = 0x1D,
126 CRC8_WCDMA_POLYNOMIAL = 0x9B,
127 CRC16_PVIZ_POLYNOMIAL = 0x8005,
128 CRC16_CHAKRAVARTY_POLYNOMIAL = 0x2F15,
129 CRC16_ARINC_POLYNOMIAL = 0xA02B,
130 CRC16_CCITT_POLYNOMIAL = 0x1021,
131 CRC16_CDMA_POLYNOMIAL = 0xC867,
132 CRC16_DECT_POLYNOMIAL = 0x0589,
133 CRC16_DIF_POLYNOMIAL = 0x8BB7,
134 CRC16_DNP_POLYNOMIAL = 0x3D65,
135 CRC16_IBM_POLYNOMIAL = 0x8005,
136 CRC16_OPENSAFETY_A_POLYNOMIAL = 0x5935,
137 CRC16_OPENSAFETY_B_POLYNOMIAL = 0x755B,
138 CRC16_PROFIBUS_POLYNOMIAL = 0x1DCF
140 typedef enum CRC_POLYNOMIAL_e CRC_POLYNOMIAL_t;
155 #define p33c_CrcModule_GetHandle() (struct P33C_CRC_MODULE_s*)&CRCCONL 157 #endif // end of P33C_CRC_MODULE_s 164 extern volatile uint16_t p33c_CrcModule_Dispose(
void);
166 extern volatile uint16_t p33c_CrcModule_ConfigWrite(
168 extern volatile uint16_t p33c_CrcModule_Initialize(
void);
169 extern volatile uint16_t p33c_CrcModule_Get_Data8_CRC16(
170 volatile uint8_t *data,
volatile uint8_t start,
volatile uint8_t size);
171 extern volatile uint16_t p33c_CrcModule_Polynomial_Config(
volatile uint8_t lendian,
volatile uint8_t data_width,
172 volatile uint8_t poly_size,
volatile enum CRC_POLYNOMIAL_e poly,
volatile uint16_t seed);
volatile struct tagCRCCONLBITS bits
union P33C_CRC_MODULE_s::@48 CrcDatl
union P33C_CRC_MODULE_s::@44 CrcConl
union P33C_CRC_MODULE_s::@50 CrcWdatl
union P33C_CRC_MODULE_s::@51 CrcWdath
union P33C_CRC_MODULE_s::@46 CrcXorl
union P33C_CRC_MODULE_s::@49 CrcDath
union P33C_CRC_MODULE_s::@47 CrcXorh
union P33C_CRC_MODULE_s::@45 CrcConh