![]() |
NEORV32 Software Framework Documentation
The NEORV32 RISC-V Processor
|
Cyclic redundancy check unit (CRC) HW driver header file. More...
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | neorv32_crc_t |
Functions | |
Prototypes | |
int | neorv32_crc_available (void) |
void | neorv32_crc_setup (uint32_t mode, uint32_t poly, uint32_t start) |
uint32_t | neorv32_crc_block (uint8_t *byte, int length) |
void | neorv32_crc_single (uint8_t byte) |
uint32_t | neorv32_crc_get (void) |
IO Device: Cyclic Redundancy Check Unit (CRC) | |
#define | NEORV32_CRC ((neorv32_crc_t*) (NEORV32_CRC_BASE)) |
enum | NEORV32_CRC_MODE_enum { CRC_MODE8 = 0b00 , CRC_MODE16 = 0b01 , CRC_MODE32 = 0b10 } |
Cyclic redundancy check unit (CRC) HW driver header file.
#define NEORV32_CRC ((neorv32_crc_t*) (NEORV32_CRC_BASE)) |
CRC module hardware access (neorv32_crc_t)
int neorv32_crc_available | ( | void | ) |
Check if CRC unit was synthesized.
uint32_t neorv32_crc_block | ( | uint8_t * | byte, |
int | length ) |
Compute pre-configured CRC for entire data block.
[in] | byte | Pointer to byte (uint8_t) source data array. |
[in] | length | Length of source data array. |
uint32_t neorv32_crc_get | ( | void | ) |
Get current CRC shift register data.
void neorv32_crc_setup | ( | uint32_t | mode, |
uint32_t | poly, | ||
uint32_t | start ) |
Setup CRC unit.
[in] | mode | Operation mode (NEORV32_CRC_MODE_enum). |
[in] | poly | CRC polynomial. |
[in] | start | CRC shift register start value. |
void neorv32_crc_single | ( | uint8_t | byte | ) |
Compute pre-configured CRC for single data byte.
[in] | byte | Data byte (uint8_t). |