summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/chaoskey-v1.0/Makefile1
-rw-r--r--src/stmf0/ao_crc.h3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/chaoskey-v1.0/Makefile b/src/chaoskey-v1.0/Makefile
index f6b78d07..f2c168ba 100644
--- a/src/chaoskey-v1.0/Makefile
+++ b/src/chaoskey-v1.0/Makefile
@@ -14,6 +14,7 @@ INC = \
ao_task.h \
ao_adc_fast.h \
ao_power.h \
+ ao_crc.h \
stm32f0.h
#
diff --git a/src/stmf0/ao_crc.h b/src/stmf0/ao_crc.h
index 7acc6f9c..b6d91023 100644
--- a/src/stmf0/ao_crc.h
+++ b/src/stmf0/ao_crc.h
@@ -35,7 +35,8 @@
static inline uint16_t
ao_crc_in_32_out_16(uint32_t v) {
stm_crc.dr.u32 = v;
- return stm_crc.dr.u16;
+ v = stm_crc.dr.u32;
+ return v ^ (v >> 16);
}
static inline uint16_t