STM32L4xx_HAL_Driver  1.14.0

Functions

__STATIC_INLINE void LL_CRC_FeedData32 (CRC_TypeDef *CRCx, uint32_t InData)
 Write given 32-bit data to the CRC calculator DR DR LL_CRC_FeedData32. More...
 
__STATIC_INLINE void LL_CRC_FeedData16 (CRC_TypeDef *CRCx, uint16_t InData)
 Write given 16-bit data to the CRC calculator DR DR LL_CRC_FeedData16. More...
 
__STATIC_INLINE void LL_CRC_FeedData8 (CRC_TypeDef *CRCx, uint8_t InData)
 Write given 8-bit data to the CRC calculator DR DR LL_CRC_FeedData8. More...
 
__STATIC_INLINE uint32_t LL_CRC_ReadData32 (CRC_TypeDef *CRCx)
 Return current CRC calculation result. 32 bits value is returned. DR DR LL_CRC_ReadData32. More...
 
__STATIC_INLINE uint16_t LL_CRC_ReadData16 (CRC_TypeDef *CRCx)
 Return current CRC calculation result. 16 bits value is returned. More...
 
__STATIC_INLINE uint8_t LL_CRC_ReadData8 (CRC_TypeDef *CRCx)
 Return current CRC calculation result. 8 bits value is returned. More...
 
__STATIC_INLINE uint8_t LL_CRC_ReadData7 (CRC_TypeDef *CRCx)
 Return current CRC calculation result. 7 bits value is returned. More...
 
__STATIC_INLINE uint32_t LL_CRC_Read_IDR (CRC_TypeDef *CRCx)
 Return data stored in the Independent Data(IDR) register. More...
 
__STATIC_INLINE void LL_CRC_Write_IDR (CRC_TypeDef *CRCx, uint32_t InData)
 Store data in the Independent Data(IDR) register. More...
 

Detailed Description

Function Documentation

◆ LL_CRC_FeedData16()

__STATIC_INLINE void LL_CRC_FeedData16 ( CRC_TypeDef *  CRCx,
uint16_t  InData 
)

Write given 16-bit data to the CRC calculator DR DR LL_CRC_FeedData16.

Parameters
CRCxCRC Instance
InData16 bit value to be provided to CRC calculator between between Min_Data=0 and Max_Data=0xFFFF
Return values
None

Definition at line 337 of file stm32l4xx_ll_crc.h.

338 {
339  __IO uint16_t *pReg;
340 
341  pReg = (__IO uint16_t *)(__IO void *)(&CRCx->DR); /* Derogation MisraC2012 R.11.5 */
342  *pReg = InData;
343 }

◆ LL_CRC_FeedData32()

__STATIC_INLINE void LL_CRC_FeedData32 ( CRC_TypeDef *  CRCx,
uint32_t  InData 
)

Write given 32-bit data to the CRC calculator DR DR LL_CRC_FeedData32.

Parameters
CRCxCRC Instance
InDatavalue to be provided to CRC calculator between between Min_Data=0 and Max_Data=0xFFFFFFFF
Return values
None

Definition at line 325 of file stm32l4xx_ll_crc.h.

326 {
327  WRITE_REG(CRCx->DR, InData);
328 }

◆ LL_CRC_FeedData8()

__STATIC_INLINE void LL_CRC_FeedData8 ( CRC_TypeDef *  CRCx,
uint8_t  InData 
)

Write given 8-bit data to the CRC calculator DR DR LL_CRC_FeedData8.

Parameters
CRCxCRC Instance
InData8 bit value to be provided to CRC calculator between between Min_Data=0 and Max_Data=0xFF
Return values
None

Definition at line 352 of file stm32l4xx_ll_crc.h.

353 {
354  *(uint8_t __IO *)(&CRCx->DR) = (uint8_t) InData;
355 }

◆ LL_CRC_Read_IDR()

__STATIC_INLINE uint32_t LL_CRC_Read_IDR ( CRC_TypeDef *  CRCx)

Return data stored in the Independent Data(IDR) register.

Note
This register can be used as a temporary storage location.
Refer to the Reference Manual to get the authorized data length in bits. IDR IDR LL_CRC_Read_IDR
Parameters
CRCxCRC Instance
Return values
Valuestored in CRC_IDR register

Definition at line 412 of file stm32l4xx_ll_crc.h.

413 {
414  return (uint32_t)(READ_REG(CRCx->IDR));
415 }

◆ LL_CRC_ReadData16()

__STATIC_INLINE uint16_t LL_CRC_ReadData16 ( CRC_TypeDef *  CRCx)

Return current CRC calculation result. 16 bits value is returned.

Note
This function is expected to be used in a 16 bits CRC polynomial size context. DR DR LL_CRC_ReadData16
Parameters
CRCxCRC Instance
Return values
CurrentCRC calculation result as stored in CRC_DR register (16 bits).

Definition at line 375 of file stm32l4xx_ll_crc.h.

376 {
377  return (uint16_t)READ_REG(CRCx->DR);
378 }

◆ LL_CRC_ReadData32()

__STATIC_INLINE uint32_t LL_CRC_ReadData32 ( CRC_TypeDef *  CRCx)

Return current CRC calculation result. 32 bits value is returned. DR DR LL_CRC_ReadData32.

Parameters
CRCxCRC Instance
Return values
CurrentCRC calculation result as stored in CRC_DR register (32 bits).

Definition at line 363 of file stm32l4xx_ll_crc.h.

364 {
365  return (uint32_t)(READ_REG(CRCx->DR));
366 }

◆ LL_CRC_ReadData7()

__STATIC_INLINE uint8_t LL_CRC_ReadData7 ( CRC_TypeDef *  CRCx)

Return current CRC calculation result. 7 bits value is returned.

Note
This function is expected to be used in a 7 bits CRC polynomial size context. DR DR LL_CRC_ReadData7
Parameters
CRCxCRC Instance
Return values
CurrentCRC calculation result as stored in CRC_DR register (7 bits).

Definition at line 399 of file stm32l4xx_ll_crc.h.

400 {
401  return (uint8_t)(READ_REG(CRCx->DR) & 0x7FU);
402 }

◆ LL_CRC_ReadData8()

__STATIC_INLINE uint8_t LL_CRC_ReadData8 ( CRC_TypeDef *  CRCx)

Return current CRC calculation result. 8 bits value is returned.

Note
This function is expected to be used in a 8 bits CRC polynomial size context. DR DR LL_CRC_ReadData8
Parameters
CRCxCRC Instance
Return values
CurrentCRC calculation result as stored in CRC_DR register (8 bits).

Definition at line 387 of file stm32l4xx_ll_crc.h.

388 {
389  return (uint8_t)READ_REG(CRCx->DR);
390 }

◆ LL_CRC_Write_IDR()

__STATIC_INLINE void LL_CRC_Write_IDR ( CRC_TypeDef *  CRCx,
uint32_t  InData 
)

Store data in the Independent Data(IDR) register.

Note
This register can be used as a temporary storage location.
Refer to the Reference Manual to get the authorized data length in bits. IDR IDR LL_CRC_Write_IDR
Parameters
CRCxCRC Instance
InDatavalue to be stored in CRC_IDR register
Return values
None

Definition at line 426 of file stm32l4xx_ll_crc.h.

427 {
428 #if (CRC_IDR_IDR == 0x0FFU)
429  *((uint8_t __IO *)(&CRCx->IDR)) = (uint8_t) InData;
430 #else
431  WRITE_REG(CRCx->IDR, InData);
432 #endif
433 }