PER Firmware
Loading...
Searching...
No Matches
crc_priv.h
Go to the documentation of this file.
1
7#ifndef __PHAL_G4_CRC_PRIV_H__
8#define __PHAL_G4_CRC_PRIV_H__
9
10#include "stm32g474xx.h"
11
13static constexpr uint32_t CRC_PRIV_POLY_CRC32 = 0x04C11DB7;
14
16static constexpr uint32_t CRC_PRIV_INIT_VALUE = 0xFFFFFFFF;
17
19void CRC_PRIV_enableClock(void);
20
22void CRC_PRIV_setConfig(void);
23
25void CRC_PRIV_reset(void);
26
28void CRC_PRIV_feedWord(uint32_t word);
29
31uint32_t CRC_PRIV_readResult(void);
32
33#endif // __PHAL_G4_CRC_PRIV_H__
void CRC_PRIV_reset(void)
Reset the CRC unit, reloading the initial value into the data register.
Definition crc_priv.c:24
static constexpr uint32_t CRC_PRIV_POLY_CRC32
CRC-32/MPEG-2 polynomial.
Definition crc_priv.h:13
void CRC_PRIV_enableClock(void)
Enable the CRC peripheral clock on AHB1.
Definition crc_priv.c:9
void CRC_PRIV_setConfig(void)
Configure the polynomial, size, and initial value for CRC-32/MPEG-2.
Definition crc_priv.c:18
void CRC_PRIV_feedWord(uint32_t word)
Feed one 32-bit word into the CRC data register.
Definition crc_priv.c:29
uint32_t CRC_PRIV_readResult(void)
Read the accumulated CRC result from the data register.
Definition crc_priv.c:33
static constexpr uint32_t CRC_PRIV_INIT_VALUE
Initial CRC value loaded into the data register on reset.
Definition crc_priv.h:16