![]() |
S32 SDK
|
Cyclic Redundancy Check Peripheral Driver.
This section describes the programming interface of the CRC driver.
Data Structures | |
struct | crc_user_config_t |
CRC configuration structure. Implements : crc_user_config_t_Class. More... | |
Variables | |
CRC_Type *const | g_crcBase [CRC_INSTANCE_COUNT] |
Table of base addresses for CRC instances. More... | |
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... | |
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_Configure | ( | uint32_t | instance, |
const crc_user_config_t * | userConfigPtr | ||
) |
Configures the CRC module from a user configuration structure.
This function configures the CRC module from a user configuration structure
[in] | instance | The CRC instance number |
[in] | userConfigPtr | Pointer to structure of initialization |
Definition at line 143 of file crc_driver.c.
status_t CRC_DRV_Deinit | ( | uint32_t | instance | ) |
Sets the default configuration.
This function sets the default configuration
[in] | instance | The CRC instance number |
Definition at line 86 of file crc_driver.c.
uint32_t CRC_DRV_GetCrcResult | ( | uint32_t | instance | ) |
Returns the current result of the CRC calculation.
This function returns the current result of the CRC calculation
[in] | instance | The CRC instance number |
Definition at line 127 of file crc_driver.c.
status_t CRC_DRV_Init | ( | uint32_t | instance, |
const crc_user_config_t * | userConfigPtr | ||
) |
Initializes the CRC module.
This function initializes CRC driver based on user configuration input. The user must make sure that the clock is enabled
[in] | instance | The CRC instance number |
[in] | userConfigPtr | Pointer to structure of initialization |
Definition at line 63 of file crc_driver.c.
void CRC_DRV_WriteData | ( | uint32_t | instance, |
const uint8_t * | data, | ||
uint32_t | dataSize | ||
) |
Appends a block of bytes to the current CRC calculation.
This function appends a block of bytes to the current CRC calculation
[in] | instance | The CRC instance number |
[in] | data | Data for current CRC calculation |
[in] | dataSize | Length of data to be calculated |
Definition at line 104 of file crc_driver.c.
CRC_Type* const g_crcBase[CRC_INSTANCE_COUNT] |
Table of base addresses for CRC instances.
Definition at line 50 of file crc_driver.c.