This section describes the programming interface of the CRC driver.
CRC Driver Initialization
To initialize the CRC module, call CRC_DRV_Init() function and pass the user configuration data structure to it.
CRC Driver Operation
The CRC_DRV_Configure() function is used to write the user configuration to the CRC hardware module before starting operation by calling the CRC_DRV_GetCrcBlock() function.
|
CRC_Type *const | g_crcBase [CRC_INSTANCE_COUNT] |
| Table of base addresses for the CRC instances. More...
|
|
This structure holds the configuration for the CRC.
This API should be called with the initial configuration before any other operations.
- Parameters
-
instance | CRC instance ID. |
userConfigPtr | Pointer to structure of initialization, see to "crc_user_config_t". |
- Returns
- Execution status.
void CRC_DRV_Deinit |
( |
uint32_t |
instance | ) |
|
Shuts down the CRC instance.
- Parameters
-
- Returns
- Execution status.
uint32_t CRC_DRV_GetCrcBlock |
( |
uint32_t |
instance, |
|
|
uint8_t * |
data, |
|
|
uint32_t |
dataLen |
|
) |
| |
This function appends a block of bytes to the current CRC calculation and returns a new result.
- Parameters
-
instance | CRC instance ID. |
data | data for current CRC calculation |
dataLen | length of data to be calculated |
- Returns
- Execution status.
This function configures the CRC module from a user configuration structure.
- Parameters
-
instance | CRC instance ID. |
userConfigPtr | Pointer to structure of initialization, see to "crc_user_config_t". |
- Returns
- Execution status.
CRC_Type* const g_crcBase[CRC_INSTANCE_COUNT] |