libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
crc_v2.h File Reference
Include dependency graph for crc_v2.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CRC_DR8   MMIO8(CRC_BASE + 0x00)
 CRC_DR Data register 8bit wide access. More...
 
#define CRC_DR16   MMIO16(CRC_BASE + 0x00)
 CRC_DR Data register 16bit wide access. More...
 
#define CRC_INIT   MMIO32(CRC_BASE + 0x10)
 CRC_INIT Initial CRC Value. More...
 
#define CRC_POL   MMIO32(CRC_BASE + 0x14)
 CRC_POL CRC Polynomial. More...
 
#define CRC_CR_REV_OUT   (1 << 7)
 
#define CRC_CR_REV_IN_SHIFT   5
 
#define CRC_CR_REV_IN   (3 << CRC_CR_REV_IN_SHIFT)
 
#define CRC_CR_REV_IN_NONE   (0 << CRC_CR_REV_IN_SHIFT)
 
#define CRC_CR_REV_IN_BYTE   (1 << CRC_CR_REV_IN_SHIFT)
 
#define CRC_CR_REV_IN_HALF   (2 << CRC_CR_REV_IN_SHIFT)
 
#define CRC_CR_REV_IN_WORD   (3 << CRC_CR_REV_IN_SHIFT)
 
#define CRC_CR_POLYSIZE_SHIFT   3
 
#define CRC_CR_POLYSIZE   (3 << CRC_CR_POLYSIZE_SHIFT)
 
#define CRC_CR_POLYSIZE_32   (0 << CRC_CR_POLYSIZE_SHIFT)
 
#define CRC_CR_POLYSIZE_16   (1 << CRC_CR_POLYSIZE_SHIFT)
 
#define CRC_CR_POLYSIZE_8   (2 << CRC_CR_POLYSIZE_SHIFT)
 
#define CRC_CR_POLYSIZE_7   (3 << CRC_CR_POLYSIZE_SHIFT)
 
#define CRC_POL_DEFAULT   0x04C11DB7
 Default polynomial. More...
 

Functions

void crc_reverse_output_enable (void)
 Enable reverse output data. More...
 
void crc_reverse_output_disable (void)
 Disable reverse output data. More...
 
void crc_set_reverse_input (uint32_t reverse_in)
 Reverse input data. More...
 
void crc_set_polysize (uint32_t polysize)
 Polynomial size. More...
 
void crc_set_polynomial (uint32_t polynomial)
 Polynomial coefficient. More...
 
void crc_set_initial (uint32_t initial)
 CRC Initial value. More...