![]() |
NUC472_NUC442_BSP V3.03.005
The Board Support Package for NUC472/NUC442
|
Macros | |
#define | CRC_SET_SEED(u32Seed) { CRC->SEED = (u32Seed); CRC->CTL |= CRC_CTL_CRCRST_Msk; } |
Set CRC Seed Value. More... | |
#define | CRC_GET_SEED() (CRC->SEED) |
Get CRC Seed Value. More... | |
#define | CRC_WRITE_DATA(u32Data) (CRC->DAT = (u32Data)) |
CRC Write Data. More... | |
Functions | |
void | CRC_Open (uint32_t u32Mode, uint32_t u32Attribute, uint32_t u32Seed, uint32_t u32DataLen) |
CRC Open. More... | |
uint32_t | CRC_GetChecksum (void) |
Get CRC Checksum. More... | |
#define CRC_GET_SEED | ( | ) | (CRC->SEED) |
#define CRC_SET_SEED | ( | u32Seed | ) | { CRC->SEED = (u32Seed); CRC->CTL |= CRC_CTL_CRCRST_Msk; } |
Set CRC Seed Value.
[in] | u32Seed | Seed value |
This macro is used to set CRC seed value.
#define CRC_WRITE_DATA | ( | u32Data | ) | (CRC->DAT = (u32Data)) |
uint32_t CRC_GetChecksum | ( | void | ) |
void CRC_Open | ( | uint32_t | u32Mode, |
uint32_t | u32Attribute, | ||
uint32_t | u32Seed, | ||
uint32_t | u32DataLen | ||
) |
CRC Open.
[in] | u32Mode | CRC operation polynomial mode. Valid values are: |
[in] | u32Attribute | CRC operation data attribute. Valid values are combined with: |
[in] | u32Seed | Seed value. |
[in] | u32DataLen | CPU Write Data Length. Valid values are: |
This function will enable the CRC controller by specify CRC operation mode, attribute, initial seed and write data length.
After that, user can start to perform CRC calculate by calling CRC_WRITE_DATA macro or CRC_DAT register directly.