[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] [patch #7485] CRC8-CCITT
From: |
Frédéric Nadeau |
Subject: |
Re: [avr-libc-dev] [patch #7485] CRC8-CCITT |
Date: |
Fri, 3 May 2013 12:50:43 -0400 |
On Fri, May 3, 2013 at 9:52 AM, Joerg Wunsch <address@hidden> wrote:
> Update of patch #7485 (project avr-libc):
>
> Status: None => In Progress
> Assigned to: None => joerg_wunsch
>
> _______________________________________________________
>
> Follow-up Comment #1:
>
> Curious, what's the reference for naming it after CCITT?
>
> _______________________________________________________
>
> Reply to this item at:
>
> <http://savannah.nongnu.org/patch/?7485>
>
> _______________________________________________
> Nachricht gesendet von/durch Savannah
> http://savannah.nongnu.org/
>
I wrote the patch to support LTC6803 chip that only gives the
polynomial in question and no name.
I guess it shouldn't be named that way, the CCITT recommendation
include a XOR at the end. It is sometime referenced as CRC-ATM and
CRC-ITU
Page 6(PDF page 12)
http://www.itu.int/rec/T-REC-I.432.1-199902-I/en
http://www.itu.int/rec/dologin_pub.asp?lang=e&id=T-REC-I.432.1-199902-I!!PDF-E&type=items
The CRC-ROHC as the same polynomial but not the same start value.
RFC 3095 gives the polynomial as for IR and IR-DYN packet
http://tools.ietf.org/html/rfc3095#section-5.9.1
This site, which have a catalogue of CRC, gives no suffix to the name (CRC-8).
http://reveng.sourceforge.net/
http://reveng.sourceforge.net/crc-catalogue/1-15.htm
Since all three CRC use the same polynomial, here is my proposition to
cover all three cases:
- rename to _crc8_update
- Caller shall chose it's initial value(0x00 for simple use and
CCITT/ITU/ATM or 0xFF for ROHC)
- Caller apply xor at the end if needed.
- Modify doc accordingly
If we agree on that, I'll resubmit a patch asap.