思澈科技软件开发工具包  2.20
Peripheral Control functions

Functions

uint32_t HAL_CRC_Accumulate (CRC_HandleTypeDef *hcrc, uint8_t *pBuffer, uint32_t BufferLength)
 Computes the 32-bit CRC of 32-bit data buffer using combination of the previous CRC value and the new one. More...
 
uint32_t HAL_CRC_Calculate (CRC_HandleTypeDef *hcrc, uint8_t *pBuffer, uint32_t BufferLength)
 Computes the 32-bit CRC of 32-bit data buffer independently of the previous CRC value. More...
 
void HAL_CRC_Setmode (CRC_HandleTypeDef *hcrc, HAL_CRC_Mode mode)
 Set CRC mode for calculation. More...
 
void HAL_CRC_Setmode_Customized (CRC_HandleTypeDef *hcrc, uint32_t init, uint32_t poly, HAL_CRC_Mode mode)
 Set Cutomized CRC mode for calculation. More...
 

Detailed Description

    ==============================================================================
                    ##### Peripheral Control functions #####
    ==============================================================================
      [..]  This section provides functions allowing to:
        (+) Compute the 32-bit CRC value of 32-bit data buffer,
            using combination of the previous CRC value and the new one.
        (+) Compute the 32-bit CRC value of 32-bit data buffer,
            independently of the previous CRC value.

Function Documentation

◆ HAL_CRC_Accumulate()

uint32_t HAL_CRC_Accumulate ( CRC_HandleTypeDef hcrc,
uint8_t *  pBuffer,
uint32_t  BufferLength 
)

Computes the 32-bit CRC of 32-bit data buffer using combination of the previous CRC value and the new one.

Parameters
hcrcpointer to a CRC_HandleTypeDef structure that contains the configuration information for CRC
pBufferpointer to the buffer containing the data to be computed
BufferLengthlength of the buffer to be computed
Return values
32-bitCRC

◆ HAL_CRC_Calculate()

uint32_t HAL_CRC_Calculate ( CRC_HandleTypeDef hcrc,
uint8_t *  pBuffer,
uint32_t  BufferLength 
)

Computes the 32-bit CRC of 32-bit data buffer independently of the previous CRC value.

Parameters
hcrcpointer to a CRC_HandleTypeDef structure that contains the configuration information for CRC
pBufferPointer to the buffer containing the data to be computed
BufferLengthLength of the buffer to be computed
Return values
32-bitCRC

◆ HAL_CRC_Setmode()

void HAL_CRC_Setmode ( CRC_HandleTypeDef hcrc,
HAL_CRC_Mode  mode 
)

Set CRC mode for calculation.

Parameters
hcrcpointer to a CRC_HandleTypeDef structure that contains the configuration information for CRC
modefor CRC calculation, please ref to CRC Mode definition

◆ HAL_CRC_Setmode_Customized()

void HAL_CRC_Setmode_Customized ( CRC_HandleTypeDef hcrc,
uint32_t  init,
uint32_t  poly,
HAL_CRC_Mode  mode 
)

Set Cutomized CRC mode for calculation.

Parameters
hcrcpointer to a CRC_HandleTypeDef structure that contains the configuration information for CRC
initinitial CRC value
polyProgrammable polynomial
modeMode for CRC calculation, but use customized initial value and poly