STM32L486xx HAL User Manual
Defines | Functions
stm32l4xx_ll_crc.h File Reference

Header file of CRC LL module. More...

#include "stm32l4xx.h"

Go to the source code of this file.

Defines

#define LL_CRC_POLYLENGTH_32B   0x00000000U
#define LL_CRC_POLYLENGTH_16B   CRC_CR_POLYSIZE_0
#define LL_CRC_POLYLENGTH_8B   CRC_CR_POLYSIZE_1
#define LL_CRC_POLYLENGTH_7B   (CRC_CR_POLYSIZE_1 | CRC_CR_POLYSIZE_0)
#define LL_CRC_INDATA_REVERSE_NONE   0x00000000U
#define LL_CRC_INDATA_REVERSE_BYTE   CRC_CR_REV_IN_0
#define LL_CRC_INDATA_REVERSE_HALFWORD   CRC_CR_REV_IN_1
#define LL_CRC_INDATA_REVERSE_WORD   (CRC_CR_REV_IN_1 | CRC_CR_REV_IN_0)
#define LL_CRC_OUTDATA_REVERSE_NONE   0x00000000U
#define LL_CRC_OUTDATA_REVERSE_BIT   CRC_CR_REV_OUT
#define LL_CRC_DEFAULT_CRC32_POLY   0x04C11DB7U
#define LL_CRC_DEFAULT_CRC_INITVALUE   0xFFFFFFFFU
#define LL_CRC_WriteReg(__INSTANCE__, __REG__, __VALUE__)   WRITE_REG(__INSTANCE__->__REG__, __VALUE__)
 Write a value in CRC register.
#define LL_CRC_ReadReg(__INSTANCE__, __REG__)   READ_REG(__INSTANCE__->__REG__)
 Read a value in CRC register.

Functions

__STATIC_INLINE void LL_CRC_ResetCRCCalculationUnit (CRC_TypeDef *CRCx)
 Reset the CRC calculation unit.
__STATIC_INLINE void LL_CRC_SetPolynomialSize (CRC_TypeDef *CRCx, uint32_t PolySize)
 Configure size of the polynomial.
__STATIC_INLINE uint32_t LL_CRC_GetPolynomialSize (CRC_TypeDef *CRCx)
 Return size of the polynomial.
__STATIC_INLINE void LL_CRC_SetInputDataReverseMode (CRC_TypeDef *CRCx, uint32_t ReverseMode)
 Configure the reversal of the bit order of the input data.
__STATIC_INLINE uint32_t LL_CRC_GetInputDataReverseMode (CRC_TypeDef *CRCx)
 Return type of reversal for input data bit order.
__STATIC_INLINE void LL_CRC_SetOutputDataReverseMode (CRC_TypeDef *CRCx, uint32_t ReverseMode)
 Configure the reversal of the bit order of the Output data.
__STATIC_INLINE uint32_t LL_CRC_GetOutputDataReverseMode (CRC_TypeDef *CRCx)
 Configure the reversal of the bit order of the Output data.
__STATIC_INLINE void LL_CRC_SetInitialData (CRC_TypeDef *CRCx, uint32_t InitCrc)
 Initialize the Programmable initial CRC value.
__STATIC_INLINE uint32_t LL_CRC_GetInitialData (CRC_TypeDef *CRCx)
 Return current Initial CRC value.
__STATIC_INLINE void LL_CRC_SetPolynomialCoef (CRC_TypeDef *CRCx, uint32_t PolynomCoef)
 Initialize the Programmable polynomial value (coefficients of the polynomial to be used for CRC calculation).
__STATIC_INLINE uint32_t LL_CRC_GetPolynomialCoef (CRC_TypeDef *CRCx)
 Return current Programmable polynomial value.
__STATIC_INLINE void LL_CRC_FeedData32 (CRC_TypeDef *CRCx, uint32_t InData)
 Write given 32-bit data to the CRC calculator.
__STATIC_INLINE void LL_CRC_FeedData16 (CRC_TypeDef *CRCx, uint16_t InData)
 Write given 16-bit data to the CRC calculator.
__STATIC_INLINE void LL_CRC_FeedData8 (CRC_TypeDef *CRCx, uint8_t InData)
 Write given 8-bit data to the CRC calculator.
__STATIC_INLINE uint32_t LL_CRC_ReadData32 (CRC_TypeDef *CRCx)
 Return current CRC calculation result.
__STATIC_INLINE uint16_t LL_CRC_ReadData16 (CRC_TypeDef *CRCx)
 Return current CRC calculation result.
__STATIC_INLINE uint8_t LL_CRC_ReadData8 (CRC_TypeDef *CRCx)
 Return current CRC calculation result.
__STATIC_INLINE uint8_t LL_CRC_ReadData7 (CRC_TypeDef *CRCx)
 Return current CRC calculation result.
__STATIC_INLINE uint32_t LL_CRC_Read_IDR (CRC_TypeDef *CRCx)
 Return data stored in the Independent Data(IDR) register.
__STATIC_INLINE void LL_CRC_Write_IDR (CRC_TypeDef *CRCx, uint32_t InData)
 Store data in the Independent Data(IDR) register.
ErrorStatus LL_CRC_DeInit (CRC_TypeDef *CRCx)
 De-initialize CRC registers (Registers restored to their default values).

Detailed Description

Header file of CRC LL module.

Author:
MCD Application Team
Attention:

© COPYRIGHT(c) 2017 STMicroelectronics

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file stm32l4xx_ll_crc.h.