libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
|
Functions | |
void | crc_reset (void) |
Reset the CRC calculator to initial values. More... | |
uint32_t | crc_calculate (uint32_t data) |
Writes a data word to the register, the write operation stalling until the computation is complete. More... | |
uint32_t | crc_calculate_block (uint32_t *datap, int size) |
Add a block of data to the CRC calculator and return the final result. More... | |
void | crc_reverse_output_enable () |
Enable reverse output data. More... | |
void | crc_reverse_output_disable () |
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... | |
uint32_t crc_calculate | ( | uint32_t | data | ) |
Writes a data word to the register, the write operation stalling until the computation is complete.
[in] | data | new word to add to the CRC calculator |
Definition at line 36 of file crc_common_all.c.
References CRC_DR.
uint32_t crc_calculate_block | ( | uint32_t * | datap, |
int | size | ||
) |
Add a block of data to the CRC calculator and return the final result.
Writes data words consecutively to the register, the write operation stalling until the computation of each word is complete, then returns the final result
[in] | datap | pointer to an array of 32 bit data words. |
[in] | size | length of data, in 32bit increments |
Definition at line 43 of file crc_common_all.c.
References CRC_DR.
void crc_reset | ( | void | ) |
Reset the CRC calculator to initial values.
Definition at line 31 of file crc_common_all.c.
References CRC_CR, and CRC_CR_RESET.
void crc_reverse_output_disable | ( | void | ) |
void crc_reverse_output_enable | ( | void | ) |
Enable reverse output data.
Enables the reversal of the bit order of the output data.
Definition at line 38 of file crc_v2.c.
References CRC_CR, and CRC_CR_REV_OUT.
void crc_set_initial | ( | uint32_t | initial | ) |
void crc_set_polynomial | ( | uint32_t | polynomial | ) |
Polynomial coefficient.
Set the coefficients of the polynomial to be used for CRC calculation. If the polynomial size is less than 32-bits, the least significant bits have to be used to program the correct value.
[in] | polynomial | Unsigned int32. Polynomial coefficient. |
Definition at line 98 of file crc_v2.c.
References CRC_POL.
void crc_set_polysize | ( | uint32_t | polysize | ) |
Polynomial size.
Set the size of the polynomial.
[in] | polysize | Unsigned int32. Size of polynomial CRC Polynomial size. |
Definition at line 75 of file crc_v2.c.
References CRC_CR.
void crc_set_reverse_input | ( | uint32_t | reverse_in | ) |
Reverse input data.
Controls the reversal of the bit order of the input data
[in] | reverse_in | Unsigned int32. Reversal bit order CRC Reverse input options. |
Definition at line 61 of file crc_v2.c.
References CRC_CR.