Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
cubexHal.pdf
Скачиваний:
110
Добавлен:
10.02.2016
Размер:
16.16 Mб
Скачать

HAL CRC Generic Driver

 

UM1725

Function Description

DeInitializes the CRC MSP.

Parameters

 

hcrc: pointer to a CRC_HandleTypeDef structure that

 

 

contains the configuration information for CRC

Return values

 

None

9.2.9HAL_CRC_Accumulate

Function Name

uint32_t HAL_CRC_Accumulate (CRC_HandleTypeDef * hcrc,

 

uint32_t pBuffer, uint32_t BufferLength)

Function Description

Computes the 32-bit CRC of 32-bit data buffer using combination

 

of the previous CRC value and the new one.

Parameters

 

hcrc: pointer to a CRC_HandleTypeDef structure that

 

 

contains the configuration information for CRC

 

 

pBuffer: pointer to the buffer containing the data to be

 

 

computed

 

 

BufferLength: length of the buffer to be computed

Return values

 

32-bit CRC

9.2.10HAL_CRC_Calculate

Function Name

uint32_t HAL_CRC_Calculate (CRC_HandleTypeDef * hcrc,

 

uint32_t pBuffer, uint32_t BufferLength)

Function Description

Computes the 32-bit CRC of 32-bit data buffer independently of

 

the previous CRC value.

Parameters

 

hcrc: pointer to a CRC_HandleTypeDef structure that

 

 

contains the configuration information for CRC

 

 

pBuffer: Pointer to the buffer containing the data to be

 

 

computed

 

 

BufferLength: Length of the buffer to be computed

Return values

 

32-bit CRC

9.2.11HAL_CRC_GetState

Function Name

HAL_CRC_StateTypeDef HAL_CRC_GetState

 

(CRC_HandleTypeDef * hcrc)

Function Description

Returns the CRC state.

Parameters

 

hcrc: pointer to a CRC_HandleTypeDef structure that

 

 

contains the configuration information for CRC

Return values

 

HAL state

9.3CRC Firmware driver defines

9.3.1CRC

CRC Exported Macros

__HAL_CRC_RESET_HANDLE_STATE Description:

Resets CRC handle state.

170/900

DOCID025834 Rev 2

UM1725

 

HAL CRC Generic Driver

 

Parameters:

 

 

__HANDLE__: CRC handle

 

Return value:

 

 

None

__HAL_CRC_DR_RESET

Description:

 

Resets CRC Data Register.

 

Parameters:

 

 

__HANDLE__: CRC handle

 

Return value:

 

 

None

__HAL_CRC_SET_IDR

Description:

 

Stores a 8-bit data in the Independent

 

 

Data(ID) register.

 

Parameters:

 

 

__HANDLE__: CRC handle

 

__VALUE__: 8-bit value to be stored in the

 

 

ID register

 

Return value:

 

 

None

__HAL_CRC_GET_IDR

Description:

 

Returns the 8-bit data stored in the

 

 

Independent Data(ID) register.

 

Parameters:

 

 

__HANDLE__: CRC handle

 

Return value:

 

8-bit: value of the ID register

DOCID025834 Rev 2

171/900

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]