aboutsummaryrefslogtreecommitdiff
path: root/include/libopencm3/stm32/crc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libopencm3/stm32/crc.h')
-rw-r--r--include/libopencm3/stm32/crc.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/libopencm3/stm32/crc.h b/include/libopencm3/stm32/crc.h
index 6ae4085..7d80259 100644
--- a/include/libopencm3/stm32/crc.h
+++ b/include/libopencm3/stm32/crc.h
@@ -55,4 +55,24 @@
/* TODO */
+/**
+ * Reset the CRC calculator to initial values.
+ */
+void crc_reset(void);
+
+/**
+ * Add a word to the crc calculator and return the result.
+ * @param data new word to add to the crc calculator
+ * @return final crc calculator value
+ */
+u32 crc_calculate(u32 data);
+
+/**
+ * Add a block of data to the CRC calculator and return the final result
+ * @param datap pointer to the start of a block of 32bit data words
+ * @param size length of data, in 32bit increments
+ * @return final CRC calculator value
+ */
+u32 crc_calculate_block(u32 *datap, int size);
+
#endif