FD32M0P Microcontroller SDK
Loading...
Searching...
No Matches
crc.h File Reference
#include "CRC_REGS.h"
#include "CRC_RW_API.h"
#include <stdbool.h>
Include dependency graph for crc.h:
This graph shows which files directly or indirectly include this file:

Data Structures

struct  crc_cfg_s
 CRC Configuration Struct. More...

Macros

#define CRC_CFG_DEFAULT
 Default Initializer for CRC Configuration Struct.

Functions

void crc_cfg (CRC_REGS_s *regs, const crc_cfg_s *cfg)
 This function configures CRC peripheral with polynomial type input bit reveral, output bit reversal, input and output endianness.
void crc_set_seed (CRC_REGS_s *regs, uint32_t seed)
 This function sets the CRC seed value.
void crc_feed_32bit_data (CRC_REGS_s *regs, const uint32_t *buffer, uint32_t length)
 This function writes a sequence of 32-bit words from the input buffer into the CRC input register block.
void crc_feed_16bit_data (CRC_REGS_s *regs, const uint16_t *buffer, uint32_t length)
 This function writes a sequence of 16-bit words from the input buffer into the CRC input register block.
void crc_feed_8bit_data (CRC_REGS_s *regs, const uint8_t *buffer, uint32_t length)
 This function writes a sequence of 8-bit words from the input buffer into the CRC input register block.
uint32_t crc_get_result (CRC_REGS_s *regs)
 This function returns the crc result.
uint32_t crc_compute_32bit_block (CRC_REGS_s *regs, uint32_t length, const uint32_t *buffer, uint32_t seed)
 This function feeds a block of 32-bit data from the input buffer into the CRC input register, sets the seed and returns the calculated crc result.
uint32_t crc_compute_16bit_block (CRC_REGS_s *regs, uint32_t length, const uint16_t *buffer, uint32_t seed)
 This function feeds a block of 16-bit data from the input buffer into the CRC input register, sets the seed and returns the calculated crc result.
uint32_t crc_compute_8bit_block (CRC_REGS_s *regs, uint32_t length, const uint8_t *buffer, uint32_t seed)
 This function feeds a block of 8-bit data from the input buffer into the CRC input register, sets the seed and returns the calculated crc result.
uint32_t crc_compute_32bit_mem_range (CRC_REGS_s *regs, uint32_t length, uint32_t seed, const uint32_t *start_addr)
 This function computes CRC over a memory range of 32-bit words, sets seed, returns the crc result.
uint32_t crc_compute_16bit_mem_range (CRC_REGS_s *regs, uint32_t length, uint32_t seed, const uint16_t *start_addr)
 This function computes CRC over a memory range of 16-bit words, sets seed, returns the crc result.
uint32_t crc_compute_8bit_mem_range (CRC_REGS_s *regs, uint32_t length, uint32_t seed, const uint8_t *start_addr)
 This function computes CRC over a memory range of 8-bit words, sets seed, returns the crc result.
void crc_read_cfg (CRC_REGS_s *regs, crc_cfg_s *rd_cfg)
 This function reads the CRC configurations from the register space, puts them in the configuration struct provided in the input.