34 #include "fsl_common.h" 46 #define FSL_CRC_DRIVER_VERSION (MAKE_VERSION(2, 0, 0)) 49 #if defined(FSL_FEATURE_CRC_HAS_CRC_REG) && FSL_FEATURE_CRC_HAS_CRC_REG 55 #ifndef CRC_DRIVER_CUSTOM_DEFAULTS 56 #define CRC_DRIVER_USE_CRC16_CCIT_FALSE_AS_DEFAULT 1 60 typedef enum _crc_bits
67 typedef enum _crc_result
69 kCrcFinalChecksum = 0U,
83 typedef struct _crc_config
99 #if defined(__cplusplus) 124 CLOCK_DisableClock(kCLOCK_Crc0);
155 void CRC_WriteData(CRC_Type *base,
const uint8_t *data,
size_t dataSize);
182 #if defined(__cplusplus) uint32_t polynomial
Definition: fsl_crc.h:85
bool reflectIn
Definition: fsl_crc.h:88
crc_bits_t
CRC bit width.
Definition: fsl_crc.h:60
crc_result_t
CRC result type.
Definition: fsl_crc.h:67
crc_bits_t crcBits
Definition: fsl_crc.h:91
CRC protocol configuration.
Definition: fsl_crc.h:83
void CRC_GetDefaultConfig(crc_config_t *config)
Loads default values to CRC protocol configuration structure.
Definition: fsl_crc.c:205
static void CRC_Deinit(CRC_Type *base)
Disable the CRC peripheral module.
Definition: fsl_crc.h:121
void CRC_Init(CRC_Type *base, const crc_config_t *config)
Enable and configure the CRC peripheral module.
Definition: fsl_crc.c:190
crc_result_t crcResult
Definition: fsl_crc.h:92
void CRC_WriteData(CRC_Type *base, const uint8_t *data, size_t dataSize)
Write data to the CRC module.
Definition: fsl_crc.c:217
bool reflectOut
Definition: fsl_crc.h:89
uint16_t CRC_Get16bitResult(CRC_Type *base)
Read 16-bit checksum from the CRC module.
Definition: fsl_crc.c:249
static uint32_t CRC_Get32bitResult(CRC_Type *base)
Read 32-bit checksum from the CRC module.
Definition: fsl_crc.h:166
bool complementChecksum
Definition: fsl_crc.h:90
uint32_t seed
Definition: fsl_crc.h:87