Midnight Sun Firmware
Loading...
Searching...
No Matches
crc.h
1#pragma once
2
3/************************************************************************************************
4 * @file crc.h
5 *
6 * @brief CRC Library Header file
7 *
8 * @date 2025-02-04
9 * @author Midnight Sun Team #24 - MSXVI
10 ************************************************************************************************/
11
12/* Standard library Headers */
13#include <stddef.h>
14#include <stdint.h>
15
16/* Inter-component Headers */
17
18/* Intra-component Headers */
19#include "status.h"
20
28typedef enum {
34
43StatusCode crc_init(CRCLength crc_length);
44
54uint32_t crc_calculate(const uint32_t *data, size_t length);
55
61void crc_reset(void);
62
CRCLength
CRC Length.
Definition: crc.h:28
void crc_reset(void)
Reset the CRC hardware peripheral.
Definition: crc.c:67
StatusCode crc_init(CRCLength crc_length)
Initilize the CRC API with default values.
Definition: crc.c:23
uint32_t crc_calculate(const uint32_t *data, size_t length)
Calculate the CRC-32/16/8 checksum for a buffer of 32-bit values.
Definition: crc.c:59
@ CRC_LENGTH_16
Definition: crc.h:30
@ NUM_CRC_LENGTHS
Definition: crc.h:32
@ CRC_LENGTH_8
Definition: crc.h:29
@ CRC_LENGTH_32
Definition: crc.h:31
StatusCode
StatusCodes for various errors.
Definition: status.h:27