aboutsummaryrefslogtreecommitdiffstats
path: root/src/crc4itu.c
AgeCommit message (Collapse)AuthorFilesLines
2020-09-04move old software snippets and hacks to software/obsoleteHarald Welte1-56/+0
2018-05-12CRC4: use proper CRC4 table to avoid bit-reversal of each byteHarald Welte1-23/+50
In commit 9bd2c9ffe7cf82c5d0a12406db018717d9b78858 we fixed the CRC4 computation by bit-reversing every byte before using it in the CRC table. This is of course a waste of CPU cycles. Let's just compute the CRC4 table slightly different (thanks to Dietter): The following commands using pycrc from pycrc.org were used: ./pycrc.py --width=4 --poly=0x3 --reflect-in=false --reflect-out=false --xor-out=0 --xor-in=0 --algorithm table-driven --generate c -o crc4itu.c ./pycrc.py --width=4 --poly=0x3 --reflect-in=false --reflect-out=false --xor-out=0 --xor-in=0 --algorithm table-driven --generate h -o crc4itu.h
2018-05-11HACK to make CRC4 computation workHarald Welte1-1/+2
* reverse bit-order of every input byte when computing CRC4 * reverse bit-order of CRC4 value we receive in TS0 bits I don't really understand why, but this makes the CRC check pass. We probably need another table if we want to avoid this.
2018-05-07WIP: Software for E1 mux/demuxHarald Welte1-0/+28