ecc.h File Reference

Go to the source code of this file.

## Macros

#define | MAX_NPAR 16
#define | TRUE 1
#define | FALSE 0
#define | MAXDEG (MAX_NPAR*2)

## Typedefs

typedef unsigned long | BIT32
typedef unsigned short | BIT16

## Functions

void | initialize_ecc (int n_par)
int | check_syndrome (void)
void | decode_data (unsigned char data[], int nbytes)
void | encode_data (unsigned char msg[], int nbytes, unsigned char dst[])
BIT16 | crc_ccitt (unsigned char *msg, int len)
void | init_galois_tables (void)
int | ginv (int elt)
int | gmult (int a, int b)
int | correct_errors_erasures (unsigned char codeword[], int csize, int nerasures, int erasures[])
void | add_polys (int dst[], int src[])
void | scale_poly (int k, int poly[])
void | mult_polys (int dst[], int p1[], int p2[])
void | copy_poly (int dst[], int src[])
void | zero_poly (int poly[])

## Variables

int | pBytes [MAXDEG]
int | synBytes [MAXDEG]
int | DEBUG
int | gexp []
int | glog []

## Macro Definition Documentation

## FALSE

#define FALSE 0

## MAX_NPAR

#define MAX_NPAR 16

## MAXDEG

#define MAXDEG (MAX_NPAR*2)

## TRUE

#define TRUE 1

## Typedef Documentation

## BIT16

typedef unsigned short BIT16

## BIT32

typedef unsigned long BIT32

## Function Documentation

## add_polys()

void add_polys | ( | int | dst[],
|  | int | src[]
| ) |  |

## check_syndrome()

int check_syndrome | ( | void |  | ) |

## copy_poly()

void copy_poly | ( | int | dst[],
|  | int | src[]
| ) |  |

## correct_errors_erasures()

int correct_errors_erasures | ( | unsigned char | codeword[],
|  | int | csize,
|  | int | nerasures,
|  | int | erasures[]
| ) |  |

## crc_ccitt()

BIT16 crc_ccitt | ( | unsigned char * | msg,
|  | int | len
| ) |  |

## decode_data()

void decode_data | ( | unsigned char | data[],
|  | int | nbytes
| ) |  |

## encode_data()

void encode_data | ( | unsigned char | msg[],
|  | int | nbytes,
|  | unsigned char | dst[]
| ) |  |

## ginv()

int ginv | ( | int | elt | ) |

## gmult()

int gmult | ( | int | a,
|  | int | b
| ) |  |

## init_galois_tables()

void init_galois_tables | ( | void |  | ) |

## initialize_ecc()

void initialize_ecc | ( | int | n_par | ) |

## mult_polys()

void mult_polys | ( | int | dst[],
|  | int | p1[],
|  | int | p2[]
| ) |  |

## scale_poly()

void scale_poly | ( | int | k,
|  | int | poly[]
| ) |  |

## zero_poly()

void zero_poly | ( | int | poly[] | ) |

## Variable Documentation

## DEBUG

int DEBUG

extern

## gexp

int gexp[]

extern

## glog

int glog[]

extern

## pBytes

int pBytes[MAXDEG]

extern

## synBytes

int synBytes[MAXDEG]

extern