Midnight Sun Firmware
Loading...
Searching...
No Matches
bootloader_crc32.h
1#pragma once
2
3/************************************************************************************************
4 * @file bootloader_crc32.h
5 *
6 * @brief Header file for the CRC32 calculations in the bootloader
7 *
8 * @date 2025-01-08
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 "bootloader_error.h"
20
28#define BYTES_TO_WORD(bytes) (bytes / 4)
29
35
42uint32_t boot_crc32_calculate(const uint32_t *buffer, size_t buffer_len);
43
50void boot_align_to_32bit_words(uint8_t *buffer, size_t *buffer_len);
51
uint32_t boot_crc32_calculate(const uint32_t *buffer, size_t buffer_len)
Calculate a CRC32 on a provided data buffer.
Definition: bootloader_crc32.c:21
BootloaderError boot_crc32_init(void)
Initialize the CRC hardware component.
Definition: bootloader_crc32.c:17
void boot_align_to_32bit_words(uint8_t *buffer, size_t *buffer_len)
Align a provided data buffer to the 4-byte boundary.
Definition: bootloader_crc32.c:25
BootloaderError
Bootloader error definitions.
Definition: bootloader_error.h:28