TUKS MCU Introductory course / TUKS-COURSE-THERMOMETER

Fork of TUKS-COURSE-TIMER by TUKS MCU Introductory course

Embed: (wiki syntax)

« Back to documentation index

Peripheral Control functions

Peripheral Control functions
[CRC Exported Functions]

management functions. More...

Functions

uint32_t HAL_CRC_Accumulate (CRC_HandleTypeDef *hcrc, uint32_t pBuffer[], uint32_t BufferLength)
 Compute the 7, 8, 16 or 32-bit CRC value of an 8, 16 or 32-bit data buffer starting with the previously computed CRC as initialization value.
uint32_t HAL_CRC_Calculate (CRC_HandleTypeDef *hcrc, uint32_t pBuffer[], uint32_t BufferLength)
 Compute the 7, 8, 16 or 32-bit CRC value of an 8, 16 or 32-bit data buffer starting with hcrc->Instance->INIT as initialization value.

Detailed Description

management functions.

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


Function Documentation

uint32_t HAL_CRC_Accumulate ( CRC_HandleTypeDef *  hcrc,
uint32_t  pBuffer[],
uint32_t  BufferLength 
)

Compute the 7, 8, 16 or 32-bit CRC value of an 8, 16 or 32-bit data buffer starting with the previously computed CRC as initialization value.

Parameters:
hcrc,:CRC handle
pBuffer,:pointer to the input data buffer, exact input data format is provided by hcrc->InputDataFormat.
BufferLength,:input data buffer length (number of bytes if pBuffer type is * uint8_t, number of half-words if pBuffer type is * uint16_t, number of words if pBuffer type is * uint32_t).
Note:
By default, the API expects a uint32_t pointer as input buffer parameter. Input buffer pointers with other types simply need to be cast in uint32_t and the API will internally adjust its input data processing based on the handle field hcrc->InputDataFormat.
Return values:
uint32_tCRC (returned value LSBs for CRC shorter than 32 bits)

Definition at line 306 of file stm32l4xx_hal_crc.c.

uint32_t HAL_CRC_Calculate ( CRC_HandleTypeDef *  hcrc,
uint32_t  pBuffer[],
uint32_t  BufferLength 
)

Compute the 7, 8, 16 or 32-bit CRC value of an 8, 16 or 32-bit data buffer starting with hcrc->Instance->INIT as initialization value.

Parameters:
hcrc,:CRC handle
pBuffer,:pointer to the input data buffer, exact input data format is provided by hcrc->InputDataFormat.
BufferLength,:input data buffer length (number of bytes if pBuffer type is * uint8_t, number of half-words if pBuffer type is * uint16_t, number of words if pBuffer type is * uint32_t).
Note:
By default, the API expects a uint32_t pointer as input buffer parameter. Input buffer pointers with other types simply need to be cast in uint32_t and the API will internally adjust its input data processing based on the handle field hcrc->InputDataFormat.
Return values:
uint32_tCRC (returned value LSBs for CRC shorter than 32 bits)

Definition at line 366 of file stm32l4xx_hal_crc.c.