summaryrefslogtreecommitdiff
path: root/tools/hex2bin-2.0/src/libcrc.h
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2020-12-30 19:07:31 +0000
committerJuan J. Martinez <jjm@usebox.net>2020-12-30 19:23:41 +0000
commit2682bc5d1d864341aaeb42a449db73c3ecd16d70 (patch)
tree9116764364b4ee0ce7f6037305077807b57776de /tools/hex2bin-2.0/src/libcrc.h
downloadubox-msx-lib-2682bc5d1d864341aaeb42a449db73c3ecd16d70.tar.gz
ubox-msx-lib-2682bc5d1d864341aaeb42a449db73c3ecd16d70.zip
Initial import1.0
Diffstat (limited to 'tools/hex2bin-2.0/src/libcrc.h')
-rw-r--r--tools/hex2bin-2.0/src/libcrc.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/tools/hex2bin-2.0/src/libcrc.h b/tools/hex2bin-2.0/src/libcrc.h
new file mode 100644
index 0000000..39f20d0
--- /dev/null
+++ b/tools/hex2bin-2.0/src/libcrc.h
@@ -0,0 +1,44 @@
+ /********************************************************************
+ * *
+ * Library : lib_crc *
+ * File : lib_crc.h *
+ * Author : Lammert Bies 1999-2008 *
+ * E-mail : info@lammertbies.nl *
+ * Language : ANSI C *
+ * *
+ * *
+ * Description *
+ * =========== *
+ * *
+ * The file lib_crc.h contains public definitions and proto- *
+ * types for the CRC functions present in lib_crc.c. *
+ * *
+ * *
+ * Dependencies *
+ * ============ *
+ * *
+ * none *
+ * *
+ * *
+ ********************************************************************/
+#ifndef _LIBCRC_H_
+#define _LIBCRC_H_
+
+void *crc_table;
+
+void init_crc8_normal_tab(uint8_t polynom);
+void init_crc8_reflected_tab(uint8_t polynom);
+
+void init_crc16_normal_tab(uint16_t polynom);
+void init_crc16_reflected_tab(uint16_t polynom);
+void init_crc32_normal_tab(uint32_t polynom);
+void init_crc32_reflected_tab(uint32_t polynom);
+
+uint8_t update_crc8(uint8_t crc, uint8_t c);
+
+uint16_t update_crc16_normal(uint16_t crc, char c );
+uint16_t update_crc16_reflected(uint16_t crc, char c );
+uint32_t update_crc32_normal(uint32_t crc, char c );
+uint32_t update_crc32_reflected(uint32_t crc, char c );
+
+#endif /* _LIBCRC_H_ */