projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
altos/chaoskey: use both halves of the CRC
[fw/altos]
/
src
/
stmf0
/
ao_crc.h
diff --git
a/src/stmf0/ao_crc.h
b/src/stmf0/ao_crc.h
index 7acc6f9c0e33df5cb610271d73f3669ffbe982c5..b6d91023bde46e4fa8ba37df4a1647f850973d47 100644
(file)
--- 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