20#ifndef STM32H7xx_LL_CRC_H
21#define STM32H7xx_LL_CRC_H
57#define LL_CRC_POLYLENGTH_32B 0x00000000U
58#define LL_CRC_POLYLENGTH_16B CRC_CR_POLYSIZE_0
59#define LL_CRC_POLYLENGTH_8B CRC_CR_POLYSIZE_1
60#define LL_CRC_POLYLENGTH_7B (CRC_CR_POLYSIZE_1 | CRC_CR_POLYSIZE_0)
69#define LL_CRC_INDATA_REVERSE_NONE 0x00000000U
70#define LL_CRC_INDATA_REVERSE_BYTE CRC_CR_REV_IN_0
71#define LL_CRC_INDATA_REVERSE_HALFWORD CRC_CR_REV_IN_1
72#define LL_CRC_INDATA_REVERSE_WORD (CRC_CR_REV_IN_1 | CRC_CR_REV_IN_0)
81#define LL_CRC_OUTDATA_REVERSE_NONE 0x00000000U
82#define LL_CRC_OUTDATA_REVERSE_BIT CRC_CR_REV_OUT
93#define LL_CRC_DEFAULT_CRC32_POLY 0x04C11DB7U
102#define LL_CRC_DEFAULT_CRC_INITVALUE 0xFFFFFFFFU
129#define LL_CRC_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, __VALUE__)
137#define LL_CRC_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__)
167__STATIC_INLINE
void LL_CRC_ResetCRCCalculationUnit(
CRC_TypeDef *CRCx)
183__STATIC_INLINE
void LL_CRC_SetPolynomialSize(
CRC_TypeDef *CRCx, uint32_t PolySize)
198__STATIC_INLINE uint32_t LL_CRC_GetPolynomialSize(
const CRC_TypeDef *CRCx)
214__STATIC_INLINE
void LL_CRC_SetInputDataReverseMode(
CRC_TypeDef *CRCx, uint32_t ReverseMode)
229__STATIC_INLINE uint32_t LL_CRC_GetInputDataReverseMode(
const CRC_TypeDef *CRCx)
243__STATIC_INLINE
void LL_CRC_SetOutputDataReverseMode(
CRC_TypeDef *CRCx, uint32_t ReverseMode)
256__STATIC_INLINE uint32_t LL_CRC_GetOutputDataReverseMode(
const CRC_TypeDef *CRCx)
271__STATIC_INLINE
void LL_CRC_SetInitialData(
CRC_TypeDef *CRCx, uint32_t InitCrc)
273 WRITE_REG(CRCx->
INIT, InitCrc);
284__STATIC_INLINE uint32_t LL_CRC_GetInitialData(
const CRC_TypeDef *CRCx)
286 return (uint32_t)(READ_REG(CRCx->
INIT));
301__STATIC_INLINE
void LL_CRC_SetPolynomialCoef(
CRC_TypeDef *CRCx, uint32_t PolynomCoef)
303 WRITE_REG(CRCx->
POL, PolynomCoef);
315__STATIC_INLINE uint32_t LL_CRC_GetPolynomialCoef(
const CRC_TypeDef *CRCx)
317 return (uint32_t)(READ_REG(CRCx->
POL));
336__STATIC_INLINE
void LL_CRC_FeedData32(
CRC_TypeDef *CRCx, uint32_t InData)
338 WRITE_REG(CRCx->
DR, InData);
348__STATIC_INLINE
void LL_CRC_FeedData16(
CRC_TypeDef *CRCx, uint16_t InData)
352 pReg = (
__IO uint16_t *)(
__IO void *)(&CRCx->
DR);
363__STATIC_INLINE
void LL_CRC_FeedData8(
CRC_TypeDef *CRCx, uint8_t InData)
365 *(uint8_t
__IO *)(&CRCx->
DR) = (uint8_t) InData;
374__STATIC_INLINE uint32_t LL_CRC_ReadData32(
const CRC_TypeDef *CRCx)
376 return (uint32_t)(READ_REG(CRCx->
DR));
386__STATIC_INLINE uint16_t LL_CRC_ReadData16(
const CRC_TypeDef *CRCx)
388 return (uint16_t)READ_REG(CRCx->
DR);
398__STATIC_INLINE uint8_t LL_CRC_ReadData8(
const CRC_TypeDef *CRCx)
400 return (uint8_t)READ_REG(CRCx->
DR);
410__STATIC_INLINE uint8_t LL_CRC_ReadData7(
const CRC_TypeDef *CRCx)
412 return (uint8_t)(READ_REG(CRCx->
DR) & 0x7FU);
422__STATIC_INLINE uint32_t LL_CRC_Read_IDR(
const CRC_TypeDef *CRCx)
424 return (uint32_t)(READ_REG(CRCx->
IDR));
435__STATIC_INLINE
void LL_CRC_Write_IDR(
CRC_TypeDef *CRCx, uint32_t InData)
437 *((uint32_t
__IO *)(&CRCx->
IDR)) = (uint32_t) InData;
443#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
#define __IO
Definition: core_cm4.h:239
#define CRC_CR_REV_IN
Definition: stm32h723xx.h:5786
#define CRC_CR_REV_OUT
Definition: stm32h723xx.h:5791
#define CRC_CR_RESET
Definition: stm32h723xx.h:5778
#define CRC_CR_POLYSIZE
Definition: stm32h723xx.h:5781
CMSIS STM32H7xx Device Peripheral Access Layer Header File.
CRC calculation unit.
Definition: stm32h723xx.h:442
__IO uint32_t POL
Definition: stm32h723xx.h:448
__IO uint32_t INIT
Definition: stm32h723xx.h:447
__IO uint32_t DR
Definition: stm32h723xx.h:443
__IO uint32_t IDR
Definition: stm32h723xx.h:444
__IO uint32_t CR
Definition: stm32h723xx.h:445