Main Page | Class List | File List | Class Members | File Members

crc3.c File Reference

#include "crc3.h"

Go to the source code of this file.

Functions

unsigned int lookup_crc (int MC)


Function Documentation

unsigned int lookup_crc int  MC  ) 
 

Definition at line 7 of file crc3.c.

Referenced by construct_header(), and deconstruct_header().

00011 {
00012   unsigned char crc_bits;
00013   switch (MC) {
00014     case 0:    crc_bits = 0;    break;  
00015     case 1:    crc_bits = 5;    break;  
00016     case 2:    crc_bits = 7;    break;  
00017     case 3:    crc_bits = 2;    break;  
00018     case 4:    crc_bits = 3;    break;  
00019     case 5:    crc_bits = 5;    break;  
00020     case 6:    crc_bits = 4;    break;  
00021     case 7:    crc_bits = 1;    break;  
00022     case 8:    crc_bits = 5;    break;  
00023     case 9:    crc_bits = 3;    break;  
00024     case 10:    crc_bits = 1;    break; 
00025     case 11:    crc_bits = 4;    break; 
00026     case 12:    crc_bits = 5;    break; 
00027     case 13:    crc_bits = 0;    break; 
00028     case 14:    crc_bits = 2;    break; 
00029     case 15:    crc_bits = 7;    break; 
00030     default:    printf("lookup_crc() - ERROR: %d is invalid MC\n");    break;
00031   }
00032   return (crc_bits);
00033 }


Generated on Sun Jul 16 16:27:45 2006 by  doxygen 1.3.9.1