Implement predefined CRCs and add libfort

This commit is contained in:
2022-08-19 21:58:18 +02:00
parent 199b48d963
commit 3040d8a23f
6 changed files with 217 additions and 11 deletions

View File

@@ -0,0 +1,23 @@
#ifndef _NAMED_CRCS_H_
#define _NAMED_CRCS_H_
#include <stdint.h>
#include <stdbool.h>
struct crc_settings {
uint32_t polynomial;
uint32_t xor;
uint32_t start_value;
bool rev;
};
struct named_crc {
const char *name;
struct crc_settings settings;
};
const struct named_crc *reverse_lookup_named_crc(const struct crc_settings *settings);
const struct named_crc *lookup_named_crc(const char *name);
#endif /* _NAMED_CRCS_H_ */