Driver for the Cyclic Redundancy Check Calculation Unit.
It provides access to the main features of the CRCCU controller.
void crccu_configure_descriptor |
( |
Crccu * |
p_crccu, |
|
|
uint32_t |
ul_crc_dscr_addr |
|
) |
| |
void crccu_configure_mode |
( |
Crccu * |
p_crccu, |
|
|
uint32_t |
ul_mode |
|
) |
| |
void crccu_disable_dma |
( |
Crccu * |
p_crccu | ) |
|
Disable CRCCU.
- Parameters
-
p_crccu | Pointer to a CRCCU instance. |
void crccu_disable_dma_interrupt |
( |
Crccu * |
p_crccu | ) |
|
Disable CRCCU DMA transfer interrupt.
- Parameters
-
p_crccu | Pointer to a CRCCU instance. |
void crccu_disable_error_interrupt |
( |
Crccu * |
p_crccu | ) |
|
Disable cyclic redundancy check error interrupt.
- Parameters
-
p_crccu | Pointer to a CRCCU instance. |
void crccu_enable_dma |
( |
Crccu * |
p_crccu | ) |
|
Start CRCCU.
- Note
- To start the CRCCU, the user needs to set the CRC enable bit (ENABLE) in the CRCCU Mode Register (CRCCU_MR), and then configure it and finally set the DMA enable bit (DMAEN) in the CRCCU DMA Enable Register (CRCCU_DMA_EN).
-
The crccu_configure_descriptor() and crccu_configure_mode ()functions must be executed before calling this function.
- Parameters
-
p_crccu | Pointer to a CRCCU instance. |
Referenced by compute_crc(), crc32_calculate(), and generate_crc().
void crccu_enable_dma_interrupt |
( |
Crccu * |
p_crccu | ) |
|
Enable CRCCU DMA transfer interrupt.
- Parameters
-
p_crccu | Pointer to a CRCCU instance. |
void crccu_enable_error_interrupt |
( |
Crccu * |
p_crccu | ) |
|
Enable cyclic redundancy check error interrupt.
- Parameters
-
p_crccu | Pointer to a CRCCU instance. |
uint32_t crccu_get_dma_interrupt_mask |
( |
Crccu * |
p_crccu | ) |
|
Get DMA interrupt mask.
- Parameters
-
p_crccu | Pointer to a CRCCU instance. |
- Returns
- DMA interrupt mask.
uint32_t crccu_get_dma_interrupt_status |
( |
Crccu * |
p_crccu | ) |
|
Check if DMA buffer transfer has been terminated.
- Parameters
-
p_crccu | Pointer to a CRCCU instance. |
- Returns
- DMA interrupt status.
uint32_t crccu_get_dma_status |
( |
Crccu * |
p_crccu | ) |
|
uint32_t crccu_get_error_interrupt_mask |
( |
Crccu * |
p_crccu | ) |
|
Get check CRC error interrupt mask.
- Parameters
-
p_crccu | Pointer to a CRCCU instance. |
- Returns
- Error interrupt mask.
uint32_t crccu_get_error_interrupt_status |
( |
Crccu * |
p_crccu | ) |
|
Check if there is a CRC error.
- Parameters
-
p_crccu | Pointer to a CRCCU instance. |
- Returns
- Error interrupt status.
uint32_t crccu_read_crc_value |
( |
Crccu * |
p_crccu | ) |
|
void crccu_reset |
( |
Crccu * |
p_crccu | ) |
|