Parent Directory | Revision Log
First rawreader release
1 | pam-fi | 1.1 | //CRC calculation/////////////////////////////////////////// |
2 | #include "descript.h" | ||
3 | short int CRC_H(char Name_Buf[], char Name_Buf_add[]) | ||
4 | { | ||
5 | short int Summ; | ||
6 | int i; | ||
7 | int CSum, tmp; | ||
8 | |||
9 | tmp=(int)(unsigned char)(Name_Buf[0]); | ||
10 | CSum=tmp; | ||
11 | for (i=1;i<8;i++) | ||
12 | {tmp=(int)(unsigned char)(Name_Buf[i]); CSum=CSum^tmp;} | ||
13 | for (i=0;i<7;i++) | ||
14 | {tmp=(int)(unsigned char)(Name_Buf_add[i]); CSum=CSum^tmp;} | ||
15 | Summ=(short int) (CSum); | ||
16 | |||
17 | return Summ; | ||
18 | } | ||
19 |
ViewVC Help | |
Powered by ViewVC 1.1.23 |