S32 SDK
crc_driver.h File Reference
#include <stddef.h>
#include "device_registers.h"
#include "status.h"

Go to the source code of this file.

Data Structures

struct  crc_user_config_t
 CRC configuration structure. Implements : crc_user_config_t_Class. More...
 

Macros

#define CRC_DEFAULT_WRITE_TRANSPOSE   CRC_TRANSPOSE_NONE
 
#define CRC_DEFAULT_SEED   (0xFFFFU)
 

Enumerations

enum  crc_transpose_t { CRC_TRANSPOSE_NONE = 0x00U, CRC_TRANSPOSE_BITS = 0x01U, CRC_TRANSPOSE_BITS_AND_BYTES = 0x02U, CRC_TRANSPOSE_BYTES = 0x03U }
 CRC type of transpose of read write data Implements : crc_transpose_t_Class. More...
 

Functions

CRC DRIVER API
status_t CRC_DRV_Init (uint32_t instance, const crc_user_config_t *userConfigPtr)
 Initializes the CRC module. More...
 
status_t CRC_DRV_Deinit (uint32_t instance)
 Sets the default configuration. More...
 
uint32_t CRC_DRV_GetCrc32 (uint32_t instance, uint32_t data, bool newSeed, uint32_t seed)
 Appends 32-bit data to the current CRC calculation and returns new result. More...
 
uint32_t CRC_DRV_GetCrc16 (uint32_t instance, uint16_t data, bool newSeed, uint32_t seed)
 Appends 16-bit data to the current CRC calculation and returns new result. More...
 
uint32_t CRC_DRV_GetCrc8 (uint32_t instance, uint8_t data, bool newSeed, uint32_t seed)
 Appends 8-bit data to the current CRC calculation and returns new result. More...
 
void CRC_DRV_WriteData (uint32_t instance, const uint8_t *data, uint32_t dataSize)
 Appends a block of bytes to the current CRC calculation. More...
 
uint32_t CRC_DRV_GetCrcResult (uint32_t instance)
 Returns the current result of the CRC calculation. More...
 
status_t CRC_DRV_Configure (uint32_t instance, const crc_user_config_t *userConfigPtr)
 Configures the CRC module from a user configuration structure. More...
 
status_t CRC_DRV_GetConfig (uint32_t instance, crc_user_config_t *const userConfigPtr)
 Get configures of the CRC module currently. More...
 
status_t CRC_DRV_GetDefaultConfig (crc_user_config_t *const userConfigPtr)
 Get default configures the CRC module for configuration structure. More...