* Makefile.in, configure.in, configure,
[fw/sdcc] / device / examples / crc.c
1 typedef unsigned char byte;
2
3 byte accum_checksum(byte cs, byte val)
4 {
5         unsigned int tmp;
6
7         tmp = ((cs<<7) | (cs>>1)) + val;
8
9         return (byte)tmp + ((byte) (tmp>>8) & 1);
10 }