File: crcs.c

package info (click to toggle)
sdcc 3.4.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 60,316 kB
  • ctags: 69,276
  • sloc: ansic: 418,778; cpp: 48,792; makefile: 46,787; sh: 28,453; asm: 11,918; perl: 8,387; yacc: 6,640; lisp: 1,630; lex: 746; python: 660; awk: 495; sed: 89
file content (11 lines) | stat: -rw-r--r-- 196 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
#include <8051.h>
typedef unsigned char byte;

byte accum_checksum(byte cs, byte val)
{
	register unsigned char tmp;

	tmp = ((cs<<1) | (cs>>7)) + val;

        return (CY ? ( tmp + 1 ) : tmp);
}